当前位置: 首页>>代码示例>>PHP>>正文


PHP JView::setLayoutExt方法代码示例

本文整理汇总了PHP中JView::setLayoutExt方法的典型用法代码示例。如果您正苦于以下问题:PHP JView::setLayoutExt方法的具体用法?PHP JView::setLayoutExt怎么用?PHP JView::setLayoutExt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JView的用法示例。


在下文中一共展示了JView::setLayoutExt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: homepage

 /**
  * TuiyoViewProfile::display()
  * @param mixed $tpl
  * @return void
  */
 public function homepage($tpl = null)
 {
     $model = TuiyoLoader::model("applications", true);
     $nModel = TuiyoLoader::model("notifications", true);
     $pModel = TuiyoLoader::model("profile", true);
     $document = $GLOBALS['API']->get("document");
     $user = $GLOBALS['API']->get('user', empty($profileID) ? null : (int) $profileID);
     //$document->enqueMessage( "This is a sample Message" , "notice" );
     $livestyle = TUIYO_LIVE_PATH . '/client/default/';
     $document->addCSS(TUIYO_LIVE_PATH . '/client/default/css/homepage.css');
     $document->addJS(TUIYO_LIVE_PATH . '/client/default/script/homepage.js');
     $document->addJS(TUIYO_STREAM);
     $document->addJS(TUIYO_OEMBED);
     //If guest profile?
     if ($user->joomla->get('guest')) {
         $redirect = JRoute::_(TUIYO_INDEX . "&view=welcome");
         $GLOBALS['mainframe']->redirect($redirect);
     }
     //Who has viewed my Profile
     $uPlugins = $model->getAllUserPlugins($user->id, "services", false);
     //Get the HTML
     $tmplPath = TUIYO_VIEWS . DS . "profile" . DS . "tmpl";
     $tmplVars = array("user" => $user, "styleDir" => $livestyle, "livePath" => TUIYO_LIVE_PATH, "lastVisted" => TuiyoTimer::diff(strtotime($user->joomla->lastvisitDate)), "countViews" => NULL, "lastUsed" => (array) $model->getRecentlyUsed($user->id, 8), "notices" => $nModel->getAllNotifications($user->id), "pages" => $nModel->getState('pagination'), "plugins" => $uPlugins, "visitors" => $pModel->getProfileRecentVisitors($user->id));
     //Get Timeline 2.0
     $plugins = $model->getAllSystemPlugins("services", false);
     $tplVars2 = array("styleDir" => TUIYO_STYLEDIR, "user" => $user, "sharewith" => array("p00" => "@everyone"), "plugins" => $plugins, "canPost" => !$user->joomla->get('guest') ? 1 : 0);
     $activity = $document->parseTmpl("activity", $tmplPath, $tplVars2);
     $content = $document->parseTmpl("dashboard", $tmplPath, $tmplVars);
     $this->assignRef('activity', $activity);
     $this->assignRef('livestyle', $livestyle);
     $this->assignRef("content", $content);
     parent::setLayoutExt('tpl');
     parent::display($tpl);
 }
开发者ID:night-coder,项目名称:ignite,代码行数:39,代码来源:view.html.php

示例2: testSetLayoutExt

	/**
	 * Test JViewLegacy::setLayoutExt()
	 *
	 * @since   11.3
	 * @covers  JViewLegacy::setLayoutExt
	 */
	public function testSetLayoutExt()
	{
		$this->assertAttributeEquals('php', '_layoutExt', $this->class);

		$this->class->setLayoutExt('tmpl');

		$this->assertAttributeEquals('tmpl', '_layoutExt', $this->class);
	}
开发者ID:robschley,项目名称:joomla-platform,代码行数:14,代码来源:JViewLegacyTest.php

示例3: showSetup

 /**
  * TuiyoViewWelcome::showSetup()
  * 
  * @param mixed $user
  * @return void
  */
 public function showSetup($user = null)
 {
     $tmpl = $GLOBALS['API']->get("document");
     $livestyle = TUIYO_LIVE_PATH . '/client/default/';
     //Assign References
     $this->assignRef('livestyle', $livestyle);
     $this->assignRef('user', $user);
     //Terms
     $terms = $tmpl->parseTmpl("terms", TUIYO_FILES, array(), "html");
     $this->assignRef('terms', $terms);
     //Style
     $tmpl->addCSS(TUIYO_LIVE_PATH . '/client/default/css/homepage.css');
     $tmpl->addJS(TUIYO_LIVE_PATH . '/client/default/script/setup.js');
     //Display the view
     parent::setLayout('setup');
     parent::setLayoutExt('tpl');
     parent::display();
 }
开发者ID:night-coder,项目名称:ignite,代码行数:24,代码来源:view.html.php


注:本文中的JView::setLayoutExt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。