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


PHP JControllerAdmin类代码示例

本文整理汇总了PHP中JControllerAdmin的典型用法代码示例。如果您正苦于以下问题:PHP JControllerAdmin类的具体用法?PHP JControllerAdmin怎么用?PHP JControllerAdmin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: delete

 /**
  * Removes an item.
  *
  * Overrides JControllerAdmin::delete to check the core.admin permission.
  *
  * @return  void
  *
  * @since   2.0
  */
 public function delete()
 {
     if (!JFactory::getUser()->authorise('core.admin', $this->option)) {
         JError::raiseError(500, JText::_('JERROR_ALERTNOAUTHOR'));
         jexit();
     }
     return parent::delete();
 }
开发者ID:philbertphotos,项目名称:JMapMyLDAP,代码行数:17,代码来源:hosts.php

示例2: publish

 public function publish()
 {
     parent::publish();
     $extra_id = JFactory::getApplication()->input->get('extra_id', 0, 'int');
     $extra_id_url = !empty($extra_id) ? '&extra_id=' . $extra_id : '';
     $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $extra_id_url, false));
 }
开发者ID:JozefAB,项目名称:qk,代码行数:7,代码来源:extravalues.php

示例3: delete

 public function delete()
 {
     // Get items to remove from the request and reverse the order to delete child albums first
     $cid = JFactory::getApplication()->input->get('cid', array(), 'array');
     JFactory::getApplication()->input->set('cid', array_reverse($cid));
     parent::delete();
 }
开发者ID:chaudhary4k4,项目名称:modernstore,代码行数:7,代码来源:categories.php

示例4: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     global $ext_name, $ext_name_com;
     $this->ext_name = $ext_name;
     $this->ext_name_com = JFactory::getApplication()->input->get('extension', $ext_name_com, 'string');
 }
开发者ID:JexyRu,项目名称:Ksenmart,代码行数:7,代码来源:ksencontroller.php

示例5: createView

 /**
  * Overrides method to first lookup into potential extension for the view.
  * @since	1.5
  */
 protected function createView($name, $prefix = '', $type = '', $config = array())
 {
     $extensions = JoomleagueHelper::getExtensions(JRequest::getInt('p'));
     foreach ($extensions as $e => $extension) {
         $result = null;
         // Clean the view name
         $viewName = preg_replace('/[^A-Z0-9_]/i', '', $name);
         $classPrefix = preg_replace('/[^A-Z0-9_]/i', '', $prefix);
         $viewType = preg_replace('/[^A-Z0-9_]/i', '', $type);
         // Build the view class name
         $viewClassExtension = $classPrefix . $viewName . ucfirst($extension);
         if (!class_exists($viewClassExtension)) {
             jimport('joomla.filesystem.path');
             $path = JPath::find($this->paths['view'], $this->createFileName('view', array('name' => $viewName, 'type' => $viewType)));
             if ($path) {
                 require_once $path;
                 if (class_exists($viewClassExtension)) {
                     $result = new $viewClassExtension($config);
                     return $result;
                 }
             }
         } else {
             $result = new $viewClassExtension($config);
             return $result;
         }
     }
     // Still here ? Then the extension doesn't override this, use regular view
     return parent::createView($name, $prefix, $type, $config);
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:33,代码来源:jlgcontrolleradmin.php

示例6: delete

 public function delete()
 {
     parent::delete();
     $this->input = $this->input->post->get('trieda_id', 0, 'int');
     $this->setRedirect(JRoute::_('index.php?option=com_absolventi&view=ziacilist&trieda_id=' . $this->input, false));
     $this->redirect;
 }
开发者ID:vladorf,项目名称:absolventi,代码行数:7,代码来源:ziaciadmin.php

示例7: publish

 public function publish()
 {
     parent::publish();
     if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_jhackguard/data/.rules_need_update')) {
         file_put_contents(JPATH_ADMINISTRATOR . '/components/com_jhackguard/data/.rules_need_update', "1");
     }
 }
开发者ID:ejailesb,项目名称:repo_empr,代码行数:7,代码来源:inputfilters.php

示例8: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('view_torrents', 'changeTypeYes');
     $this->registerTask('no_view_torrents', 'changeTypeNo');
     $this->registerTask('edit_torrents', 'changeTypeYes');
     $this->registerTask('no_edit_torrents', 'changeTypeNo');
     $this->registerTask('delete_torrents', 'changeTypeYes');
     $this->registerTask('no_delete_torrents', 'changeTypeNo');
     $this->registerTask('upload_torrents', 'changeTypeYes');
     $this->registerTask('no_upload_torrents', 'changeTypeNo');
     $this->registerTask('download_torrents', 'changeTypeYes');
     $this->registerTask('no_download_torrents', 'changeTypeNo');
     $this->registerTask('can_leech', 'changeTypeYes');
     $this->registerTask('no_can_leech', 'changeTypeNo');
     $this->registerTask('view_comments', 'changeTypeYes');
     $this->registerTask('no_view_comments', 'changeTypeNo');
     $this->registerTask('write_comments', 'changeTypeYes');
     $this->registerTask('no_write_comments', 'changeTypeNo');
     $this->registerTask('edit_comments', 'changeTypeYes');
     $this->registerTask('no_edit_comments', 'changeTypeNo');
     $this->registerTask('delete_comments', 'changeTypeYes');
     $this->registerTask('no_delete_comments', 'changeTypeNo');
     $this->registerTask('autopublish_comments', 'changeTypeYes');
     $this->registerTask('no_autopublish_comments', 'changeTypeNo');
     $this->registerTask('state', 'changeTypeYes');
     $this->registerTask('no_state', 'changeTypeNo');
 }
开发者ID:solderzzc,项目名称:com_tracker,代码行数:28,代码来源:groups.php

示例9: delete

 public function delete()
 {
     /*
      * получаем имя файла из записи по ID
      * удаляем файл
      * выполняем родительский метод
      */
     $cid = JFactory::getApplication()->input->get('cid', array(), 'array');
     if (is_array($cid) && count($cid) > 0) {
         $arFilesToDelete = array();
         foreach ($cid as $id) {
             $db = JFactory::getDBO();
             $q = "SELECT `id`, `filename` FROM #__downfiles WHERE id = {$id}";
             $res = $db->setQuery($q);
             $data_row = $res->loadAssoc();
             $arFilesToDelete[] = $data_row["filename"];
         }
         jimport('joomla.filesystem.file');
         foreach ($arFilesToDelete as $fname) {
             JFile::delete(JPATH_ROOT . '/' . $fname);
         }
     } else {
         JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror');
     }
     parent::delete();
 }
开发者ID:matth-oz,项目名称:com_downfiles,代码行数:26,代码来源:downfiles.php

示例10:

 function __construct()
 {
     parent::__construct();
     $this->registerTask("edit", "editAuthor");
     $this->registerTask("apply", "save");
     $this->_model = $this->getModel('Customer');
 }
开发者ID:Shtier,项目名称:digicom,代码行数:7,代码来源:customers.php

示例11: getModel

	/**
	 * Proxy for getModel.
	 */
	public function getModel($name = 'Cssmanager', $prefix = 'JEMModel', $config = array())
	{
		$model = parent::getModel($name, $prefix, array(
				'ignore_request' => true
		));
		return $model;
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:10,代码来源:cssmanager.php

示例12: getModel

 /**
  * Proxy for getModel.
  * @since	2.5
  */
 public function getModel($name = 'TSJs', $prefix = 'TSJModel', $config = array('ignore_request' => true))
 {
     //JFactory::getApplication()->enqueueMessage('Debug: TSJControllerTSJs::getModel');
     $model = parent::getModel($name, $prefix, $config);
     //JFactory::getApplication()->enqueueMessage('Debug: TSJControllerTSJs::getModel model='.$model);
     return $model;
 }
开发者ID:rsam,项目名称:com_tsj,代码行数:11,代码来源:tsjs.php

示例13:

 function __construct()
 {
     parent::__construct();
     $this->registerDefaultTask('get_survey_list');
     $this->registerTask('surveys.publish', 'publish_list');
     $this->registerTask('surveys.unpublish', 'unpublish_list');
     $this->registerTask('publish_item', 'publish_item');
     $this->registerTask('unpublish_item', 'unpublish_item');
     $this->registerTask('surveys.delete', 'delete_surveys');
     $this->registerTask('set_private', 'set_private_survey');
     $this->registerTask('unset_private', 'unset_private_survey');
     $this->registerTask('set_anonymous', 'set_anonymous_survey');
     $this->registerTask('unset_anonymous', 'unset_anonymous_survey');
     $this->registerTask('set_publicperms', 'set_public_permissions');
     $this->registerTask('unset_publicperms', 'unset_public_permissions');
     $this->registerTask('refresh', 'refresh_counters');
     $this->registerTask('responses', 'get_responses');
     $this->registerTask('responses.delete', 'delete_responses');
     $this->registerTask('copy', 'copy_surveys');
     $this->registerTask('add', 'add_survey');
     $this->registerTask('edit', 'edit_survey');
     $lang = JFactory::getLanguage();
     $lang->load(S_APP_NAME, JPATH_ROOT);
     JLoader::import('joomla.application.component.model');
     JLoader::import('survey', JPATH_ROOT . DS . 'components' . DS . S_APP_NAME . DS . 'models');
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:26,代码来源:surveys.php

示例14: getModel

 public function getModel($name = 'Profiles', $prefix = 'GAnalyticsModel')
 {
     if (JRequest::getVar('task', '') == 'delete' || JRequest::getVar('task', '') == 'profiles.delete') {
         $name = 'Profile';
     }
     $model = parent::getModel($name, $prefix, array('ignore_request' => true));
     return $model;
 }
开发者ID:naquib555,项目名称:quBitolgy,代码行数:8,代码来源:profiles.php

示例15: getModel

 public function getModel($name = '', $prefix = '', $config = array('ignore_request' => true))
 {
     $option = JRequest::getVar('option');
     $clearName = substr($option, 4);
     $prefix = ucfirst($clearName) . 'Model';
     $name = str_replace('s', '', str_replace(ucfirst($clearName) . 'Controller', '', get_class()));
     return parent::getModel($name, $prefix, $config);
 }
开发者ID:baxri,项目名称:presents,代码行数:8,代码来源:searchs.php


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