當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。