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


PHP Backend类代码示例

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


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

示例1: testCanBeEnabled

 /**
  * @dataProvider canBeEnabledProvider
  */
 public function testCanBeEnabled($boolean)
 {
     $contacts = $this->getMock('\\OCP\\Contacts\\IManager');
     $contacts->expects($this->any())->method('isEnabled')->will($this->returnValue($boolean));
     $backend = new Backend($contacts);
     $this->assertSame($boolean, $backend->canBeEnabled());
 }
开发者ID:amin-hedayati,项目名称:calendar-rework,代码行数:10,代码来源:backendTest.php

示例2: uploadImageItem

 public function uploadImageItem()
 {
     if ($img = $this->images_model->checkImgUpload()) {
         $this->crud_model->update($this->input->post('type'), ['id' => $this->input->post('id'), 'image' => $img]);
         echo Backend::tplElement('images/item', ['item' => $this->crud_model->select($this->input->post('type'), ['id' => $this->input->post('id')], 'row'), 'table' => $this->input->post('type')]);
     }
 }
开发者ID:alexber127,项目名称:StCms-v3.0,代码行数:7,代码来源:Upload.php

示例3: run

 /**
  * Generate the module
  *
  * @return string
  */
 public function run()
 {
     /** @var \BackendTemplate|object $objTemplate */
     $objTemplate = new \BackendTemplate('be_live_update');
     $objTemplate->updateClass = 'tl_confirm';
     $objTemplate->updateHeadline = $GLOBALS['TL_LANG']['tl_maintenance']['liveUpdate'];
     $objTemplate->isActive = $this->isActive();
     $strMessage = ' <a href="contao/changelog.php" onclick="Backend.openModalIframe({\'width\':860,\'title\':\'CHANGELOG\',\'url\':this.href});return false" title="' . specialchars($GLOBALS['TL_LANG']['tl_maintenance']['changelog']) . '"><img src="' . TL_FILES_URL . 'system/themes/' . \Backend::getTheme() . '/images/changelog.gif" width="14" height="14" alt="" style="vertical-align:text-bottom;padding-left:3px"></a>';
     // Newer version available
     if (\Config::get('latestVersion') && version_compare(VERSION . '.' . BUILD, \Config::get('latestVersion'), '<')) {
         $objTemplate->updateClass = 'tl_info';
         $objTemplate->updateMessage = sprintf($GLOBALS['TL_LANG']['tl_maintenance']['newVersion'], \Config::get('latestVersion')) . $strMessage;
     } else {
         $objTemplate->updateClass = 'tl_confirm';
         $objTemplate->updateMessage = sprintf($GLOBALS['TL_LANG']['tl_maintenance']['upToDate'], VERSION . '.' . BUILD) . $strMessage;
     }
     // Automatically switch to SSL
     if (\Environment::get('ssl')) {
         \Config::set('liveUpdateBase', str_replace('http://', 'https://', \Config::get('liveUpdateBase')));
     }
     $objTemplate->uid = \Config::get('liveUpdateId');
     $objTemplate->updateServer = \Config::get('liveUpdateBase') . 'index.php';
     // Run the update
     if (\Input::get('token') != '') {
         $this->runLiveUpdate($objTemplate);
     }
     $objTemplate->version = VERSION . '.' . BUILD;
     $objTemplate->liveUpdateId = $GLOBALS['TL_LANG']['tl_maintenance']['liveUpdateId'];
     $objTemplate->runLiveUpdate = specialchars($GLOBALS['TL_LANG']['tl_maintenance']['runLiveUpdate']);
     $objTemplate->referer = base64_encode(\Environment::get('base') . \Environment::get('request') . '|' . \Environment::get('server'));
     $objTemplate->updateHelp = sprintf($GLOBALS['TL_LANG']['tl_maintenance']['updateHelp'], '<a href="http://luid.inetrobots.com" target="_blank">Live Update ID</a>');
     $objTemplate->phar = file_exists(TL_ROOT . '/contao/update.phar.php');
     $objTemplate->toLiveUpdate = $GLOBALS['TL_LANG']['tl_maintenance']['toLiveUpdate'];
     return $objTemplate->parse();
 }
开发者ID:bytehead,项目名称:contao-core,代码行数:40,代码来源:LiveUpdate.php

示例4: generateRendererButton

 /**
  * Generate the metamodels renderer button.
  *
  * @param array  $row        Current row.
  * @param string $href       The button href.
  * @param string $label      The button label.
  * @param string $title      The button title.
  * @param string $icon       The button icon.
  * @param string $attributes Optional attributes.
  *
  * @return string
  */
 public function generateRendererButton($row, $href, $label, $title, $icon, $attributes)
 {
     if (empty($this->layers[$row['type']]['metamodels'])) {
         return '';
     }
     return sprintf('<a href="%s" title="%s">%s</a> ', \Backend::addToUrl($href . '&amp;id=' . $row['id']), $title, \Image::getHtml($icon, $label, $attributes));
 }
开发者ID:kikmedia,项目名称:contao-leaflet-metamodels,代码行数:19,代码来源:Layer.php

示例5: Instance

 public static function Instance()
 {
     if (self::$instance == null) {
         self::$instance = new Backend();
     }
     return self::$instance;
 }
开发者ID:vortex52,项目名称:chat,代码行数:7,代码来源:backend.php

示例6: html_list

 public function html_list($document)
 {
     Backend::add('Sub Title', $document->getMeta('name'));
     Backend::add('TabLinks', $this->getTabLinks(Controller::$action));
     Backend::add('Object', $document);
     Backend::addContent(Render::renderFile('document_list.tpl.php'));
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:7,代码来源:Document.obj.php

示例7: process

 /** 
  * Process stored event
  */
 function process()
 {
     list($group_id, $user_id) = $this->getParametersAsArray();
     if ($project = $this->getProject($group_id)) {
         if ($user_id == 0) {
             return $this->setErrorBadParam();
         }
         // CVS writers
         if ($project->usesCVS()) {
             if (!Backend::instance('CVS')->updateCVSwriters($group_id)) {
                 $this->error("Could not update CVS writers for group {$group_id}");
                 return false;
             }
         }
         // SVN access file
         if ($project->usesSVN()) {
             if (!Backend::instance('SVN')->updateSVNAccess($group_id)) {
                 $this->error("Could not update SVN access file ({$group_id})");
                 return false;
             }
         }
         // Need to update system group cache
         Backend::instance('System')->setNeedRefreshGroupCache();
         $this->done();
         return true;
     }
     return false;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:SystemEvent_MEMBERSHIP_DELETE.class.php

示例8: html_tweet

 public function html_tweet($result)
 {
     if ($result) {
         Backend::addSuccess('Tweeted!');
         Backend::addContent(var_export($result, true));
     }
 }
开发者ID:jrgns,项目名称:backend-php,代码行数:7,代码来源:Twitter.obj.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->import('BackendUser', 'User');
     $this->loadLanguageFile('tl_subscribe_plus');
     $this->loadDataContainer('tl_subscribe_plus');
 }
开发者ID:heimrichhannot,项目名称:contao-newsletter_plus,代码行数:7,代码来源:tl_newsletter_channel.php

示例10: createUser

 /**
  * Perform user creation on system
  * 
  * @param PFUser $user
  * 
  * @return Boolean
  */
 private function createUser(PFUser $user)
 {
     Backend::instance('Aliases')->setNeedUpdateMailAliases();
     $system_backend = Backend::instance('System');
     $system_backend->flushNscdAndFsCache();
     return $system_backend->createUserHome($user);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:SystemEvent_USER_CREATE.class.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->loadLanguageFile("tl_settings");
     $this->import('BackendUser', 'User');
     $this->import('Environment');
 }
开发者ID:rsclg,项目名称:RscMemberSubmissionPostProcessor,代码行数:7,代码来源:RscMemberSubmissionPostProcessor.php

示例12: tearDown

 public function tearDown() {
     unlink($GLOBALS['alias_file']);
     unset($GLOBALS['alias_file']);
     //clear the cache between each tests
     Backend::clearInstances();
     EventManager::clearInstance();
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:7,代码来源:BackendAliasesTest.php

示例13: __call

 public function __call($method, $args)
 {
     $id = md5($method . serialize($args) . serialize(get_object_vars($this->object)));
     if (($value = $this->backend->get($id)) === null) {
         $value = call_user_func_array(array($this->object, $method), $args);
         $this->backend->add($id, $value);
     }
     return $value;
 }
开发者ID:maximebf,项目名称:cachecache,代码行数:9,代码来源:ObjectWrapper.php

示例14: createFolderWithRightAccessRights

 /**
  * @throws Docman_FolderNotCreatedException
  */
 private function createFolderWithRightAccessRights($folder_path, $project_unix_name)
 {
     if (!mkdir($folder_path)) {
         throw new Docman_FolderNotCreatedException("Folder {$folder_path} not created");
     }
     $user = ForgeConfig::get('sys_http_user');
     $this->backend->changeOwnerGroupMode($folder_path, $user, $user, 0700);
     $this->logger->info("Docman root folder for project {$project_unix_name} created");
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:SystemCheck.php

示例15: init

 public function init()
 {
     parent::init();
     parent::auth();
     $this->_db = Yii::app()->db;
     exit('暂不开启,后续待开发');
 }
开发者ID:SallyU,项目名称:yiicms,代码行数:7,代码来源:AuthController.php


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