本文整理汇总了PHP中ComDefaultViewHtml类的典型用法代码示例。如果您正苦于以下问题:PHP ComDefaultViewHtml类的具体用法?PHP ComDefaultViewHtml怎么用?PHP ComDefaultViewHtml使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ComDefaultViewHtml类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
$modules = KFactory::get('com://admin/extensions.model.modules')->position('cpanel')->application('administrator')->enabled(1)->getList();
$this->assign('modules', $modules);
return parent::display();
}
示例2: display
public function display()
{
$this->parameters = $this->getParameters();
KFactory::get('joomla:document')->setTitle($this->parameters->get('page_title'));
return parent::display();
}
示例3: display
public function display()
{
$this->assign('sitebase', trim(JURI::root(), '/'));
$this->assign('token', JUtility::getToken());
$this->assign('container', $this->getModel()->getState()->container);
return parent::display();
}
示例4: display
/**
* Return the views output
*
* This function will auto assign the model data to the view if the auto_assign
* property is set to TRUE.
*
* @return string The output of the view
*/
public function display()
{
$params = KFactory::get('joomla:application')->getParams();
$this->assign('params', $params);
return parent::display();
}
示例5: display
public function display()
{
$profiler = KFactory::get('com://admin/debug.profiler.events');
$database = KFactory::get('com://admin/debug.profiler.queries');
$language = KFactory::get('joomla:language');
//Remove the template includes
$includes = get_included_files();
foreach($includes as $key => $value)
{
if($value == 'tmpl://koowa.template.stack') {
unset($includes[$key]);
}
}
$this->assign('memory' , $profiler->getMemory())
->assign('events' , $profiler->getEvents())
->assign('queries' , $database->getQueries())
->assign('languages', $language->getPaths())
->assign('includes' , $includes)
->assign('strings' , $language->getOrphans());
return parent::display();
}
示例6: _initialize
protected function _initialize(KConfig $config)
{
JSubMenuHelper::addEntry(JText::_('Newsfeeds'), 'index.php?option=com_newsfeeds&view=newsfeeds', true);
JSubMenuHelper::addEntry(JText::_('Categories'), 'index.php?option=com_categories&view=categories§ion=com_newsfeeds');
parent::_initialize($config);
}
示例7: display
public function display()
{
$targets = KFactory::tmp('site::com.stream.model.targets')->getList()->getData();
$thing = reset($targets);
$string = substr($thing['title'], 3);
$option = strtolower(substr($string, 0, stripos($string, 'controller')));
$view = strtolower(substr($string, stripos($string, 'controller') + 10));
$model = KInflector::pluralize($view);
$list = KFactory::tmp('site::com.' . $option . '.model.' . $model)->getList()->getData();
$array = array();
foreach ($list as $item) {
$array[] = $item['id'];
}
//Get the list of posts
$activities = KFactory::get($this->getModel())->set('parent_target_id', KRequest::get('get.parent_target_id', 'int'))->getList();
$myactivities = array();
foreach (@$activities as $activity) {
if (!in_array($activity->parent_target_id, $array)) {
continue;
} else {
$myactivities[] = $activity;
}
}
$this->assign('myactivities', $myactivities);
$this->assign('pagination', KFactory::get($this->getModel())->getState()->pagination);
return parent::display();
}
示例8: display
public function display()
{
$user = JFactory::getUser();
$businesses = $this->getService('com://admin/businesses.model.businesses')->created_by($user->id)->getList();
$this->assign('businesses', $businesses);
return parent::display();
}
示例9: display
public function display()
{
$user = JFactory::getUser();
$this->assign('user', $user);
$this->assign('agent', $user->gid > 18);
return parent::display();
}
示例10: display
public function display()
{
$state = $this->getModel()->getState();
$folders = KFactory::get('com://admin/files.controller.folder')
->container($state->container)
->tree(true)
->browse();
$this->assign('folders', $folders);
$config = KFactory::get('com://admin/files.model.configs')->getItem();
// prepare an extensions array for fancyupload
$extensions = $config->upload_extensions;
$this->assign('allowed_extensions', $extensions);
$this->assign('maxsize' , $config->upload_maxsize);
$this->assign('path' , $state->container->relative_path);
$this->assign('sitebase' , ltrim(JURI::root(true), '/'));
$this->assign('token' , JUtility::getToken());
$this->assign('session' , JFactory::getSession());
if (!$this->editor) {
$this->assign('editor', '');
}
return parent::display();
}
示例11: display
public function display()
{
$portal = $this->getModel()->getItem();
header('X-Portal-ID: ' . $portal->id);
$doc =& JFactory::getDocument();
if ($portal->title) {
$doc->setTitle($portal->title);
}
if ($portal->meta_keywords) {
$doc->setMetaData('Keywords', $portal->meta_keywords);
}
if ($portal->meta_description) {
$doc->setMetaData('Description', $portal->meta_description);
}
//TODO: Check if itemId
$pathway = JFactory::getApplication()->getPathway();
if (!JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_portals&view=portal&id=' . $portal->id, true)) {
$category = $this->getService('com://site/portals.model.categories')->id($portal->portals_category_id)->getItem();
if ($category->id) {
$item = JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_portals&view=category&id=' . $category->id, true);
if ($item) {
$i = 0;
foreach (explode('/', $item->route) as $part) {
$pathway->addItem(ucfirst($part), 'index.php?Itemid=' . $item->tree[$i]);
$i++;
}
}
$pathway->addItem($portal->title);
}
}
return parent::display();
}
示例12: display
/**
* @return mixed
*/
public function display()
{
$menu = JFactory::getApplication()->getMenu();
$lang = JFactory::getLanguage();
$category = $this->getModel()->getItem();
$category->layout = end(explode(':', $category->layout));
$this->setLayout($category->layout ? $category->layout : 'default');
header('X-Category-ID: ' . $category->id);
$doc =& JFactory::getDocument();
if ($category->title) {
$doc->setTitle($category->title);
}
if ($category->meta_keywords) {
$doc->setMetaData('Keywords', $category->meta_keywords);
}
if ($category->meta_description) {
$doc->setMetaData('Description', $category->meta_description);
}
if ($menu->getActive() == $menu->getDefault($lang->getTag()) || !$menu->getActive()) {
$pathway = JFactory::getApplication()->getPathway();
if (!JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_makundi&view=category&id=' . $category->id, true)) {
foreach ($category->getAncestors(array('level' => 1)) as $ancestor) {
$item = JApplication::getInstance('site')->getMenu()->getItems('link', 'index.php?option=com_makundi&view=category&id=' . $ancestor->id, true);
if ($item) {
$i = 0;
foreach (explode('/', $item->route) as $part) {
$pathway->addItem(ucfirst($part), 'index.php?Itemid=' . $item->tree[$i]);
$i++;
}
} else {
if (!JSite::getMenu()->getActive()->id) {
$pathway->addItem($ancestor->title, JRoute::_('index.php?option=com_makundi&view=category&parent_slug_path=' . $ancestor->parent_slug_path . '&slug=' . $ancestor->slug));
}
}
}
$pathway->addItem($category->title);
}
}
$descendants = array();
$descendants[] = $category->id;
$config = new KConfig();
if ($params = $menu->getActive()->params) {
$config->append($params->toArray());
}
if ($config->show_subcategories) {
$descendants = array_merge($descendants, $category->getDescendants(array('level' => 1))->getColumn('id'));
}
$config->append(array('show_description' => 1, 'show_articles' => 1));
// TODO: Set the limit default limit inside $category so we can make this more flexable.
$limit = $this->getModel()->getState()->limit;
if (!$limit) {
$this->getModel()->getState()->limit = $config->limit;
} else {
$this->getModel()->getState()->limit = 4;
}
$this->assign('params', $config);
$this->assign('parent', $this->getModel()->getItem()->getParent());
$this->assign('descendants', $descendants);
return parent::display();
}
示例13: display
public function display()
{
$app = JFactory::getApplication();
$params = $app->getParams();
$this->assign('params', $params);
$this->assign('title', $params->get('page_title') ? $params->get('page_title') : JFactory::getDocument()->getTitle());
return parent::display();
}
示例14: display
public function display()
{
$title = JText::_('Login');
JFactory::getApplication()->getPathway()->addItem($title);
JFactory::getDocument()->setTitle($title);
$this->parameters = $this->getParameters();
return parent::display();
}
示例15: _initialize
protected function _initialize(KConfig $config)
{
$config->append(array(
'template_url' => false
));
parent::_initialize($config);
}