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


PHP SiteController::execute方法代码示例

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


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

示例1: execute

 /**
  * Override execute method to init developer model
  * 
  * @return  void
  */
 public function execute()
 {
     // authorize application usage
     $this->_authorize('application', Request::getInt('id', null));
     // call parent execute
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:12,代码来源:applications.php

示例2: execute

 /**
  * Execute a task
  *
  * @return     void
  */
 public function execute()
 {
     $this->gid = Request::getVar('gid', '');
     if (!$this->gid) {
         App::redirect('index.php?option=' . $this->_option);
         return;
     }
     // Load the course page
     $this->course = Models\Course::getInstance($this->gid);
     // Ensure we found the course info
     if (!$this->course->exists() || $this->course->isDeleted() || $this->course->isUnpublished()) {
         return App::abort(404, Lang::txt('COM_COURSES_NO_COURSE_FOUND'));
     }
     // No offering provided
     if (!($offering = Request::getVar('offering', ''))) {
         App::redirect(Route::url('index.php?option=' . $this->_option . '&controller=course&gid=' . $this->course->get('alias')));
         return;
     }
     // Ensure we found the course info
     if (!$this->course->offering($offering)->exists() || $this->course->offering($offering)->isDeleted() || !$this->course->offering($offering)->access('manage', 'section') && $this->course->offering($offering)->isUnpublished()) {
         return App::abort(404, Lang::txt('COM_COURSES_NO_OFFERING_FOUND'));
     }
     // Ensure the course has been published or has been approved
     if (!$this->course->offering()->access('manage', 'section') && !$this->course->isAvailable()) {
         return App::abort(404, Lang::txt('COM_COURSES_NOT_PUBLISHED'));
     }
     parent::execute();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:33,代码来源:offering.php

示例3: execute

 /**
  * Determines task being called and attempts to execute it
  *
  * @return  void
  */
 public function execute()
 {
     if (User::isGuest()) {
         App::abort(403, Lang::txt('COM_RESOURCES_ALERTLOGIN_REQUIRED'));
     }
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:12,代码来源:authors.php

示例4: execute

 /**
  * Execute a task
  *
  * @return     void
  */
 public function execute()
 {
     // Get the component parameters
     $aconfig = Component::params('com_answers');
     $this->infolink = $aconfig->get('infolink', '/kb/points/');
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:12,代码来源:shop.php

示例5: execute

 /**
  * Execute a task
  *
  * @return     void
  */
 public function execute()
 {
     $this->warehouse = new Warehouse();
     $user = User::getRoot();
     $this->warehouse->addAccessLevels($user->getAuthorisedViewLevels());
     // Get the task
     $this->_task = Request::getCmd('task', '');
     if (empty($this->_task)) {
         $this->_task = 'home';
         $this->registerTask('__default', $this->_task);
     }
     $executed = false;
     if (!method_exists($this, $this->_task . 'Task')) {
         // Try to find a corresponding collection
         $cId = $this->warehouse->collectionExists($this->_task);
         if ($cId) {
             // if match is found -- browse collection
             $executed = true;
             $this->browseCollection($cId);
         } else {
             App::abort(404, Lang::txt('Collection Not Found'));
         }
     }
     if (!$executed) {
         parent::execute();
     }
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:32,代码来源:browse.php

示例6: execute

 /**
  * Execute function
  *
  * @return  void
  */
 public function execute()
 {
     // Is component on?
     if (!$this->config->get('component_on', 0)) {
         App::redirect('/');
         return;
     }
     // Publishing enabled?
     $this->_publishing = Plugin::isEnabled('projects', 'publications') ? 1 : 0;
     // Setup complete?
     $this->_setupComplete = $this->config->get('confirm_step', 0) ? 3 : 2;
     // Include scripts
     $this->_includeScripts();
     // Incoming project identifier
     $id = Request::getInt('id', 0);
     $alias = Request::getVar('alias', '');
     $this->_identifier = $id ? $id : $alias;
     // Incoming
     $this->_task = strtolower(Request::getWord('task', ''));
     $this->_gid = Request::getVar('gid', 0);
     // Model
     $this->model = new Models\Project($this->_identifier);
     // Execute the task
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:30,代码来源:base.php

示例7: execute

 /**
  * Execute a task
  *
  * @return     void
  */
 public function execute()
 {
     $this->warehouse = new Warehouse();
     $user = User::getRoot();
     $this->warehouse->addAccessLevels($user->getAuthorisedViewLevels());
     parent::execute();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:12,代码来源:product.php

示例8: execute

 /**
  * Determines task being called and attempts to execute it
  *
  * @return  void
  */
 public function execute()
 {
     // Set configs
     $this->_setConfigs();
     // Incoming
     $this->_incoming();
     // Resource map
     if (strrpos(strtolower($this->_alias), '.rdf') > 0) {
         $this->_resourceMap();
         return;
     }
     // Set the default task
     $this->registerTask('__default', 'intro');
     // Register tasks
     $this->registerTask('view', 'page');
     $this->registerTask('download', 'serve');
     $this->registerTask('video', 'serve');
     $this->registerTask('play', 'serve');
     $this->registerTask('watch', 'serve');
     $this->registerTask('wiki', 'wikipage');
     $this->registerTask('submit', 'contribute');
     $this->registerTask('edit', 'contribute');
     $this->registerTask('start', 'contribute');
     $this->registerTask('publication', 'contribute');
     $this->_task = trim(Request::getVar('task', ''));
     if (($this->_id || $this->_alias) && !$this->_task) {
         $this->_task = 'page';
     } elseif (!$this->_task) {
         $this->_task = 'intro';
     }
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:37,代码来源:publications.php

示例9: execute

 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     // Load the course page
     $this->course = Models\Course::getInstance(Request::getVar('gid', ''));
     $this->registerTask('edit', 'display');
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:12,代码来源:course.php

示例10: execute

 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     $this->config->set('banking', \Component::params('com_members')->get('bankAccounts'));
     $this->registerTask('__default', 'search');
     $this->registerTask('display', 'search');
     $this->registerTask('latest', 'latest.rss');
     parent::execute();
 }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:13,代码来源:questions.php

示例11: execute

 /**
  * Determines task being called and attempts to execute it
  *
  * @return     void
  */
 public function execute()
 {
     $this->_authorize();
     // Load the com_resources component config
     $rconfig = Component::params('com_resources');
     $this->rconfig = $rconfig;
     parent::execute();
 }
开发者ID:sumudinie,项目名称:hubzero-cms,代码行数:13,代码来源:attachments.php

示例12: execute

 /**
  * Execute a task
  *
  * @return	void
  */
 public function execute()
 {
     $this->model = new Manager('site', 0);
     $this->registerTask('latest', 'feed');
     $this->registerTask('latest', 'feed.rss');
     $this->registerTask('latest', 'latest.rss');
     parent::execute();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:13,代码来源:threads.php

示例13: execute

 /**
  * Determines task being called and attempts to execute it
  *
  * @return	void
  */
 public function execute()
 {
     $this->_authorize('collection');
     $this->_authorize('item');
     $this->registerTask('__default', 'posts');
     $this->registerTask('all', 'collections');
     parent::execute();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:13,代码来源:collections.php

示例14: execute

 /**
  * Execute a task
  *
  * @return  void
  */
 public function execute()
 {
     $parts = explode('/', $_SERVER['REQUEST_URI']);
     $file = array_pop($parts);
     if (substr(strtolower($file), 0, 5) == 'image' || substr(strtolower($file), 0, 4) == 'file') {
         Request::setVar('task', 'download');
     }
     parent::execute();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:14,代码来源:media.php

示例15: execute

 /**
  * Determines task being called and attempts to execute it
  *
  * @return     void
  */
 public function execute()
 {
     // Check if they are logged in
     if (User::isGuest()) {
         App::abort(403, Lang::txt('You must be logged in to access.'));
         return;
     }
     parent::execute();
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:14,代码来源:attachments.php


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