public function render() { $model = $this->getModel(); $module = $model->getRow(); if ($this->getLayout() == 'modal') { $this->menus = $this->getObject('com:pages.model.menus')->sort('title')->getRowset(); $this->pages = $this->getObject('com:pages.model.pages')->application('site')->getRowset(); $this->modules = $this->getObject('com:pages.model.modules')->application('site')->getRowset(); } if ($this->getModel()->getState()->isUnique()) { if ($module->isNew()) { $module->application = $model->application; $module->name = $model->name; } $path = Library\ClassLoader::getInstance()->getApplication($module->application); JFactory::getLanguage()->load(substr($module->extension_name, 4), $module->name, $path); } // Build path to module config file $path = Library\ClassLoader::getInstance()->getApplication('site'); $path .= '/component/' . substr($module->extension_name, 4) . '/module/' . substr($module->name, 4) . '/config.xml'; $params = new \JParameter(null, $path); $params->loadArray($module->params->toArray()); $this->params = $params; return parent::render(); }
public function render() { $state = $this->getModel()->getState(); // Enable sortable $this->sortable = $state->category && $state->sort == 'ordering' && $state->direction == 'asc'; return parent::render(); }
public function render() { //Set the language information $this->language = \JFactory::getLanguage()->getTag(); $this->direction = \JFactory::getLanguage()->isRTL() ? 'rtl' : 'ltr'; return parent::render(); }
/** * Display the view * * @return string The output of the view */ public function render() { //Get the parameters $params = $this->getObject('application')->getParams(); //Get the category $category = $this->getCategory(); //Get the parameters of the active menu item if ($page = $this->getObject('application.pages')->getActive()) { $menu_params = new JParameter($page->params); if (!$menu_params->get('page_title')) { $params->set('page_title', $category->title); } } else { $params->set('page_title', $category->title); } //Set the page title //JFactory::getDocument()->setTitle( $params->get( 'page_title' ) ); //Set the pathway if ($page->getLink()->query['view'] == 'categories') { $this->getObject('application')->getPathway()->addItem($category->title, ''); } //Set the breadcrumbs $this->params = $params; $this->category = $category; return parent::render(); }
public function render() { $this->groups = $this->getObject('com:users.model.groups')->getRowset(); $this->roles = $this->getObject('com:users.model.roles')->getRowset(); $this->groups_users = $this->getObject('com:users.model.groups_users')->getRowset(); return parent::render(); }
public function render() { //Get the parameters $params = $this->getObject('application')->getParams(); //Get the contact $contact = $this->getModel()->getData(); //Get the category $category = $this->getCategory(); //Get the parameters of the active menu item if ($page = $this->getObject('application.pages')->getActive()) { $menu_params = new JParameter($page->params); if (!$menu_params->get('page_title')) { $params->set('page_title', $contact->name); } } else { $params->set('page_title', $contact->name); } //Set the page title //JFactory::getDocument()->setTitle( $params->get( 'page_title' ) ); //Set the breadcrumbs $pathway = $this->getObject('application')->getPathway(); if ($page->getLink()->query['view'] == 'categories') { $pathway->addItem($category->title, $this->getTemplate()->getHelper('route')->category(array('row' => $category))); $pathway->addItem($contact->name, ''); } if ($page->getLink()->query['view'] == 'contacts') { $pathway->addItem($contact->name, ''); } $this->params = $params; $this->category = $category; return parent::render(); }
public function render() { $this->parameters = $this->getObject('application')->getParams(); $this->page = $this->getObject('application.pages')->getActive(); //JFactory::getDocument()->setTitle($this->parameters->get('page_title')); return parent::render(); }
public function render() { $page = $this->getObject('application.pages')->getActive(); $params = new JParameter($page->params); $folders = $this->_getFolders(); $this->folders = $folders['items']; $files = $this->_getFiles(); $this->files = $files['items']; $this->total = $files['total']; $folder = $this->getModel()->getRow(); if ($page->getLink()->query['folder'] !== $folder->path) { $path = explode('/', $folder->path); $parent = count($path) > 1 ? implode('/', array_slice($path, 0, count($path) - 1)) : ''; } else { $parent = null; } if (!$params->get('page_title')) { $params->set('page_title', $page->title); } $this->parent = $parent; $this->params = $params; $this->page = $page; $this->thumbnail_size = array('x' => 200, 'y' => 150); $this->setPathway(); return parent::render(); }
/** * Renders and echo's the views output * * @return ModuleDefaultHtml */ public function render() { //Dynamically attach the chrome filter if (!empty($this->module->chrome)) { $this->getTemplate()->attachFilter('com:pages.template.filter.chrome', array('module' => $this->getIdentifier(), 'styles' => $this->module->chrome)); } return parent::render(); }
public function render() { $title = JText::_('Login'); $this->getObject('application')->getPathway()->addItem($title); $this->user = $this->getObject('user'); $this->parameters = $this->getParameters(); return parent::render(); }
public function render() { if ($this->getLayout() == 'default') { $model = $this->getObject($this->getModel()->getIdentifier()); $this->packages = $model->distinct(true)->column('package')->getRowset(); } return parent::render(); }
public function render() { $group = $this->getModel()->getState()->group; $this->groups = $this->getObject('com:cache.model.groups')->getRowset(); $this->size = !empty($group) ? $this->groups->find($group)->size : $this->groups->size; $this->count = !empty($group) ? $this->groups->find($group)->count : $this->groups->count; return parent::render(); }
public function render() { //If no row exists assign an empty array if ($this->getModel()->getState()->row) { $this->disabled = false; } else { $this->disabled = true; } return parent::render(); }
public function render() { $settings = $this->getModel()->getRowset(); foreach ($settings as $setting) { if ($setting->getType() == 'extension' && $setting->getPath()) { \JFactory::getLanguage()->load($setting->getName(), JPATH_APPLICATION); } } return parent::render(); }
public function render() { //Load language files for each module if ($this->getLayout() == 'list') { foreach ($this->getModel()->getRowset() as $module) { $path = Library\ClassLoader::getInstance()->getApplication($module->application); JFactory::getLanguage()->load($module->getIdentifier()->package, $module->name, $path); } } return parent::render(); }
public function render() { $tables = $this->getObject('com:languages.model.tables')->getRowset(); $extensions = $this->getObject('com:extensions.model.extensions')->id(array_unique($tables->extensions_extension_id))->getRowset(); foreach ($tables as $table) { $extensions->find($table->extensions_extension_id)->enabled = $table->enabled; } $this->extension = $extensions; $this->total = count($extensions); return parent::render(); }
public function render() { //Get the active language $languages = $this->getObject('application.languages'); $active = $languages->getActive()->iso_code; //Set the language information $this->language = $active ? $active : 'en-GB'; $this->direction = \JFactory::getLanguage()->isRTL() ? 'rtl' : 'ltr'; // Set the site information $this->site = $this->getObject('application')->getSite(); return parent::render(); }
public function render() { $options = new Library\ObjectConfig(array('lang' => array('html' => \JText::_('HTML'), 'visual' => \JText::_('Visual')), 'autoheight' => true, 'codemirror' => $this->codemirror, 'codemirrorOptions' => $this->codemirrorOptions, 'toggle' => $this->toggle)); //@TODO cleanup if (!$this->id) { $this->id = $this->name; } $this->setEditorSettings(array('editor_selector' => 'editable-' . $this->id)); $this->options = Library\ObjectConfig::unbox($options); $this->settings = $this->getEditorSettings(); $this->codemirror = $this->codemirror; return parent::render(); }
public function render() { $state = $this->getModel()->getState(); //Set the limit if (empty($state->limit)) { $state->limit = $this->getObject('application')->getCfg('list_limit'); } //Set the container $this->container = $this->getModel()->getContainer(); //Set the token $this->token = $this->getObject('user')->getSession()->getToken(); return parent::render(); }
public function render() { if (!$this->id) { $this->id = $this->name; } $settings = clone $this->getConfig()->settings; $settings->editor_selector = 'editable-' . $this->id; $settings->options->toolbar = $this->toolbar ? $this->toolbar : 'standard'; if ($this->removeButtons) { $settings->removeButtons = $this->removeButtons; } $this->settings = $settings; $this->class = $this->attribs['class'] ? $this->attribs['class'] : ''; return parent::render(); }
/** * Display the view * * @return string The output of the view */ public function render() { //Get the parameters $params = $this->getObject('application')->getParams(); //Get the category $category = $this->getCategory(); //Set the pathway $page = $this->getObject('application.pages')->getActive(); if ($page->getLink()->query['view'] == 'categories') { $this->getObject('application')->getPathway()->addItem($category->title, ''); } //Set the breadcrumbs $this->params = $params; $this->category = $category; return parent::render(); }
public function render() { //Get the product $product = $this->getModel()->getData(); //Set the pathway $this->getObject('application')->getPathway()->addItem('', ''); //Get the thumbnail if ($product->attachments_attachment_id) { $this->thumbnail = $this->getObject('com:attachments.database.row.attachment')->set('id', $product->attachments_attachment_id)->load()->path; } //Get the attachments if ($product->id && $product->isAttachable()) { $this->attachments($product->getAttachments()); } return parent::render(); }
public function render() { if (!$this->id) { $this->id = $this->name; } $settings = clone $this->getConfig()->settings; $settings->editor_selector = 'editable-' . $this->id; $settings->options->toolbar = $this->toolbar ? $this->toolbar : 'standard'; if ($this->removeButtons) { $settings->removeButtons = $this->removeButtons; } // Show source button only to Super Administrators if ($this->getObject('user')->getRole() < 25) { $settings->removeButtons = isset($settings->removeButtons) ? $settings->removeButtons . ',Source' : 'Source'; } $this->settings = $settings; $this->class = $this->attribs['class'] ? $this->attribs['class'] : ''; return parent::render(); }
public function render() { $database = $this->getObject('com:debug.event.subscriber.database'); $profiler = $this->getObject('com:debug.event.profiler'); $language = \JFactory::getLanguage(); //Remove the template includes $includes = get_included_files(); foreach ($includes as $key => $value) { //Find the real file path if ($alias = Library\ClassLoader::getInstance()->getAlias($value)) { $includes[$key] = $alias; } } $this->memory = $profiler->getMemory(); $this->events = (array) $profiler->getEvents(); $this->queries = (array) $database->getQueries(); $this->languages = (array) $language->getPaths(); $this->includes = (array) $includes; $this->strings = (array) $language->getOrphans(); return parent::render(); }
public function render() { // Load languages. $language = JFactory::getLanguage(); foreach ($this->getObject('com:extensions.model.extensions')->getRowset() as $extension) { $language->load($extension->name); } // Load components. $state = $this->getModel()->getState(); $page = $this->getModel()->getRow(); $menu = $this->getObject('com:pages.model.menus')->id($state->menu)->getRow(); $this->extensions = $this->getObject('com:pages.model.types')->application($menu->application)->getRowset(); // Get available and assigned modules. $available = $this->getObject('com:pages.model.modules')->published(true)->application('site')->getRowset(); $query = $this->getObject('lib:database.query.select')->where('tbl.pages_page_id IN :id')->bind(array('id' => array((int) $page->id, 0))); $assigned = $this->getObject('com:pages.database.table.modules_pages')->select($query); $this->modules = (object) array('available' => $available, 'assigned' => $assigned); // Assign menu. $this->menu = $this->getObject('com:pages.model.menus')->id($state->menu)->getRow(); // Assign parent ID $this->parent_id = $page->getParentId(); return parent::render(); }
public function render() { $this->params = $this->getObject('application.extensions')->users->params; return parent::render(); }
public function render() { $group = $this->getModel()->getRow(); $this->users = $this->getObject('com:users.model.groups_users')->group_id($group->id)->getRowset()->user_id; return parent::render(); }
public function render() { $this->applications = array_keys(Library\ClassLoader::getInstance()->getApplications()); return parent::render(); }
public function render() { $this->params = $this->getObject('application')->getParams(); return parent::render(); }
public function render() { $this->applications = array_keys(Library\ClassLoader::getInstance()->getApplications()); $this->menus = $this->getObject('com:pages.model.menus')->getRowset(); return parent::render(); }