• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP LeftAndMain类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getFrameworkVersion

 /**
  * Get version
  *
  * @return string
  */
 public static function getFrameworkVersion()
 {
     $lm = new LeftAndMain();
     $version = $lm->CMSVersion();
     if ($version) {
         $parts = explode(', ', $version);
         foreach ($parts as $part) {
             $p = explode(': ', $part);
             if ($p[0] == 'Framework') {
                 return $p[1];
             }
         }
     }
     // As fallback, we can use deprecation but this can be changed by the user
     return Deprecation::dump_settings()['version'];
 }
开发者ID:lekoala,项目名称:silverstripe-sparkpost,代码行数:21,代码来源:SparkPostMailer.php


示例2: customise_css

 /**
  *	Apply custom styles to the absolute description element.
  *
  *	@parameter <{DESCRIPTION_CSS}> array(string)
  */
 public static function customise_css($styles)
 {
     if (is_array($styles)) {
         // Determine the path to write against.
         $URL = DESCRIPTIVE_PATH . '/css/custom.css';
         $path = Director::baseFolder() . "/{$URL}";
         // Collate each custom style where appropriate.
         $CSS = '#cms-menu-descriptive {' . PHP_EOL;
         foreach ($styles as $style => $value) {
             if (!is_numeric($style)) {
                 $CSS .= "\t{$style}: {$value} !important;" . PHP_EOL;
                 // Apply any possible background change.
                 if (strtolower($style) === 'background') {
                     $background = '#cms-menu-descriptive:before,' . PHP_EOL . '#cms-menu-descriptive:after {' . PHP_EOL;
                     $background .= "\tborder-top: 10px solid {$value} !important;" . PHP_EOL . '}' . PHP_EOL . PHP_EOL;
                     $background .= '#cms-menu-descriptive:before {' . PHP_EOL;
                     $background .= "\tborder-top: 13px solid !important;" . PHP_EOL;
                     $background .= "\tborder-top-color: inherit !important;" . PHP_EOL . '}' . PHP_EOL;
                 }
             }
         }
         $CSS .= '}' . PHP_EOL . PHP_EOL . $background;
         // Write the custom styles.
         file_put_contents($path, $CSS);
         chmod($path, 0664);
         LeftAndMain::require_css($URL);
     }
 }
开发者ID:nglasl,项目名称:silverstripe-descriptive,代码行数:33,代码来源:DescriptiveService.php


示例3: init

 public function init()
 {
     // In LeftAndMain::init() the current theme is unset.
     // we need to restore the current theme here for make the dropdown of template list.
     $theme = SSViewer::current_theme();
     parent::init();
     if (isset($theme) && $theme) {
         SSViewer::set_theme($theme);
     }
     Requirements::javascript(MCE_ROOT . 'tiny_mce_src.js');
     Requirements::javascript(SAPPHIRE_DIR . '/javascript/tiny_mce_improvements.js');
     //TODO what is going on here? where did that hover.js go? can't find it.
     //TODO We need to reimplement a hover.js?
     Requirements::javascript(CMS_DIR . '/javascript/hover.js');
     Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/controls.js');
     Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain_left.js');
     Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain_right.js');
     Requirements::javascript(CMS_DIR . '/javascript/CMSMain_left.js');
     Requirements::javascript(CMS_DIR . '/javascript/SecurityAdmin.js');
     Requirements::javascript(NEWSLETTER_DIR . '/javascript/NewsletterAdmin_left.js');
     Requirements::javascript(NEWSLETTER_DIR . '/javascript/NewsletterAdmin_right.js');
     Requirements::javascript(NEWSLETTER_DIR . '/javascript/ProgressBar.js');
     // We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
     if (!Director::is_ajax()) {
         Requirements::javascript(MCE_ROOT . 'tiny_mce_src.js');
         HtmlEditorConfig::get('cms')->setOption('ContentCSS', project() . '/css/editor.css');
         HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
     }
     // Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
     Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
     Requirements::css(NEWSLETTER_DIR . '/css/NewsletterAdmin.css');
 }
开发者ID:roed,项目名称:silverstripe-newsletter,代码行数:32,代码来源:NewsletterAdmin.php


示例4: init

 public function init()
 {
     parent::init();
     Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
     Requirements::javascript("jsparty/tiny_mce_improvements.js");
     Requirements::javascript("jsparty/hover.js");
     Requirements::javascript("jsparty/scriptaculous/controls.js");
     Requirements::javascript("cms/javascript/SecurityAdmin.js");
     Requirements::javascript("cms/javascript/LeftAndMain_left.js");
     Requirements::javascript("cms/javascript/LeftAndMain_right.js");
     Requirements::javascript("cms/javascript/CMSMain_left.js");
     Requirements::javascript("cms/javascript/ReportAdmin_left.js");
     Requirements::javascript("cms/javascript/ReportAdmin_right.js");
     Requirements::css("cms/css/ReportAdmin.css");
     // TODO Find a better solution to integrate optional Requirements in a specific order
     if (Director::fileExists("ecommerce/css/DataReportCMSMain.css")) {
         Requirements::css("ecommerce/css/DataReportCMSMain.css");
     }
     if (Director::fileExists("ecommerce/css/DataReportCMSMain.css")) {
         Requirements::javascript("ecommerce/javascript/DataReport.js");
     }
     if (Director::fileExists(project() . "/css/DataReportCMSMain.css")) {
         Requirements::css(project() . "/css/DataReportCMSMain.css");
     }
     if (Director::fileExists(project() . "/css/DataReportCMSMain.css")) {
         Requirements::javascript(project() . "/javascript/DataReport.js");
     }
     // We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
     if (!Director::is_ajax()) {
         Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array("ContentCSS" => project() . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), "Lang" => i18n::get_tinymce_lang()));
     }
 }
开发者ID:ramziammar,项目名称:websites,代码行数:32,代码来源:ReportAdmin.php


示例5: init

 public function init()
 {
     // Check permissions
     // if(!Member::currentUser() || !Member::currentUser()->isAdmin()) Security::permissionFailure($this);
     parent::init();
     /*
     		if(!$this->can('AdminCMS')) {
     			$messageSet = array(
     				'default' => "Please choose an authentication method and enter your credentials to access the CMS.",
     				'alreadyLoggedIn' => "I'm sorry, but you can't access that part of the CMS.  If you want to log in as someone else, do so below",
     				'logInAgain' => "You have been logged out of the CMS.  If you would like to log in again, enter a username and password below.",
     			);
     
     			Security::permissionFailure($this, $messageSet);
     			return;
     		}*/
     Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
     Requirements::javascript("jsparty/tiny_mce_improvements.js");
     Requirements::javascript("jsparty/hover.js");
     Requirements::javascript("jsparty/scriptaculous/controls.js");
     Requirements::javascript("cms/javascript/SecurityAdmin.js");
     Requirements::javascript("cms/javascript/LeftAndMain_left.js");
     Requirements::javascript("cms/javascript/LeftAndMain_right.js");
     Requirements::javascript("cms/javascript/CMSMain_left.js");
     Requirements::javascript("cms/javascript/NewsletterAdmin_left.js");
     Requirements::javascript("cms/javascript/NewsletterAdmin_right.js");
     Requirements::javascript("sapphire/javascript/ProgressBar.js");
     // We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
     if (!Director::is_ajax()) {
         Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array("ContentCSS" => project() . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), "Lang" => i18n::get_tinymce_lang()));
     }
     // needed for MemberTableField (Requirements not determined before Ajax-Call)
     Requirements::javascript("cms/javascript/MemberTableField.js");
     Requirements::css("cms/css/NewsletterAdmin.css");
 }
开发者ID:ramziammar,项目名称:websites,代码行数:35,代码来源:NewsletterAdmin.php


示例6: testShouldChangeSubsite

 function testShouldChangeSubsite()
 {
     $l = new LeftAndMain();
     Config::inst()->nest();
     Config::inst()->update('CMSPageEditController', 'treats_subsite_0_as_global', false);
     $this->assertTrue($l->shouldChangeSubsite('CMSPageEditController', 0, 5));
     $this->assertFalse($l->shouldChangeSubsite('CMSPageEditController', 0, 0));
     $this->assertTrue($l->shouldChangeSubsite('CMSPageEditController', 1, 5));
     $this->assertFalse($l->shouldChangeSubsite('CMSPageEditController', 1, 1));
     Config::inst()->update('CMSPageEditController', 'treats_subsite_0_as_global', true);
     $this->assertFalse($l->shouldChangeSubsite('CMSPageEditController', 0, 5));
     $this->assertFalse($l->shouldChangeSubsite('CMSPageEditController', 0, 0));
     $this->assertTrue($l->shouldChangeSubsite('CMSPageEditController', 1, 5));
     $this->assertFalse($l->shouldChangeSubsite('CMSPageEditController', 1, 1));
     Config::inst()->unnest();
 }
开发者ID:helpfulrobot,项目名称:mikenz-silverstripe-simplesubsites,代码行数:16,代码来源:LeftAndMainSubsitesTest.php


示例7: testAlternateAccessCheck

 function testAlternateAccessCheck()
 {
     $admin = $this->objFromFixture("Member", "admin");
     $this->loginAs($admin);
     $ids = array();
     $subsite1 = $this->objFromFixture('Subsite', 'domaintest1');
     $subsite2 = $this->objFromFixture('Subsite', 'domaintest2');
     $subsite3 = $this->objFromFixture('Subsite', 'domaintest3');
     $ids[] = $subsite1->ID;
     $ids[] = $subsite2->ID;
     $ids[] = $subsite3->ID;
     $ids[] = 0;
     foreach ($ids as $id) {
         Subsite::changeSubsite($id);
         //switch to main site (subsite ID zero)
         $left = new LeftAndMain();
         $this->assertTrue($left->canView(), "Admin user can view subsites LeftAndMain with id = '{$id}'");
         $this->assertEquals($id, Subsite::currentSubsiteID(), "The current subsite has not been changed in the process of checking permissions for admin user.");
     }
 }
开发者ID:hafriedlander,项目名称:silverstripe-config-experiment,代码行数:20,代码来源:LeftAndMainSubsitesTest.php


示例8: testCMSVersion

 /**
  * Test that CMS versions can be interpreted appropriately
  */
 public function testCMSVersion()
 {
     $l = new LeftAndMain();
     $this->assertEquals("2.4", $l->versionFromVersionFile('$URL: http://svn.silverstripe.com/open/modules/cms/branches/2.4/silverstripe_version $'));
     $this->assertEquals("2.2.0", $l->versionFromVersionFile('$URL: http://svn.silverstripe.com/open/modules/cms/tags/2.2.0/silverstripe_version $'));
     $this->assertEquals("trunk", $l->versionFromVersionFile('$URL: http://svn.silverstripe.com/open/modules/cms/trunk/silverstripe_version $'));
     $this->assertEquals("2.4.0-alpha1", $l->versionFromVersionFile('$URL: http://svn.silverstripe.com/open/modules/cms/tags/alpha/2.4.0-alpha1/silverstripe_version $'));
     $this->assertEquals("2.4.0-beta1", $l->versionFromVersionFile('$URL: http://svn.silverstripe.com/open/modules/cms/tags/beta/2.4.0-beta1/silverstripe_version $'));
     $this->assertEquals("2.4.0-rc1", $l->versionFromVersionFile('$URL: http://svn.silverstripe.com/open/modules/cms/tags/rc/2.4.0-rc1/silverstripe_version $'));
 }
开发者ID:rodneyway,项目名称:silverstripe-cms,代码行数:13,代码来源:LeftAndMainTest.php


示例9: init

 public function init()
 {
     //setting the uploads directory to make sure images uploaded through the content
     //editor are saved the right place
     $curr = LeftAndMain::curr();
     if ($curr) {
         //Debug::dump(get_class($curr));
         //Debug::dump(ClassInfo::ancestry($curr));
         $currClass = null;
         foreach (ClassInfo::ancestry($curr) as $class) {
             foreach (self::$supported_classes as $supported_class) {
                 if ($class == $supported_class) {
                     $currClass = $class;
                 }
             }
         }
         //Debug::dump($currClass);
         //switch (get_class($curr)) {
         switch ($currClass) {
             //Page administration
             case 'CMSPagesController':
             case 'CMSPageEditController':
                 $page = $curr->currentPage();
                 if ($page && $page->hasExtension('AssetsFolderExtension')) {
                     Upload::config()->uploads_folder = $page->getAssetsFolderDirName();
                 }
                 //Debug::dump($page->Title);
                 break;
             case 'ModelAdmin':
                 //For ModelAdmin we're falling back to cookies that we believe to have
                 //been set when setting the cms fields, see AssetFolderExtension::updateCMSFields()
                 //...as it seems to be almost impossible to figure out the current object elsewise
                 //see below for tries
                 //pull requests to fix this welcome!!!
                 //Debug::dump($this->owner->getURLParams());
                 //Debug::dump($this->owner->request->param('ModelClass'));
                 //Debug::dump($this->owner->request->remaining());
                 //Debug::dump($this->owner->request->getVars());
                 //Debug::dump($this->owner->request->params());
                 //Debug::dump($curr->currentPageID());
                 Upload::config()->uploads_folder = Cookie::get('cms-uploaddirrules-uploads-folder');
                 break;
                 //Settings
             //Settings
             case 'CMSSettingsController':
                 if (Object::has_extension('SiteConfig', 'AssetsFolderExtension')) {
                     $sc = SiteConfig::current_site_config();
                     Upload::config()->uploads_folder = $sc->getAssetsFolderDirName();
                 }
             default:
         }
     }
 }
开发者ID:titledk,项目名称:silverstripe-uploaddirrules,代码行数:53,代码来源:AssetsFolderAdmin.php


示例10: init

 public function init()
 {
     parent::init();
     // We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
     if (!Director::is_ajax()) {
         Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array("ContentCSS" => (SSViewer::current_theme() ? "themes/" . SSViewer::current_theme() : project()) . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), "Lang" => i18n::get_tinymce_lang()));
     }
     Requirements::javascript('cms/javascript/CMSMain.js');
     Requirements::javascript('cms/javascript/CMSMain_left.js');
     Requirements::javascript('cms/javascript/CMSMain_right.js');
     Requirements::javascript('sapphire/javascript/UpdateURL.js');
     /**
      * HACK ALERT: Project-specific requirements
      * 
      * We need a better way of including all of the CSS that *might* be used by this application.
      * Perhaps the ajax responses can include some instructions to go get more CSS / JavaScript?
      */
     Requirements::css("survey/css/SurveyFilter.css");
     Requirements::javascript("survey/javascript/SurveyResponses.js");
     Requirements::javascript("survey/javascript/FormResponses.js");
     Requirements::javascript("parents/javascript/NotifyMembers.js");
     Requirements::css("tourism/css/SurveyCMSMain.css");
     Requirements::javascript("tourism/javascript/QuotasReport.js");
     Requirements::javascript("sapphire/javascript/ReportField.js");
     Requirements::javascript("ptraining/javascript/BookingList.js");
     Requirements::javascript("forum/javascript/ForumAccess.js");
     Requirements::javascript('gallery/javascript/GalleryPage_CMS.js');
 }
开发者ID:ramziammar,项目名称:websites,代码行数:28,代码来源:CMSMain.php


示例11: init

 public function init()
 {
     parent::init();
     //CSS/JS Dependencies - currently not much there
     Requirements::css("calendar/css/admin/CalendarAdmin.css");
     Requirements::javascript("calendar/javascript/admin/CalendarAdmin.js");
 }
开发者ID:andrewandante,项目名称:silverstripe-calendar,代码行数:7,代码来源:CalendarAdmin.php


示例12: getSiteTreeFor

 function getSiteTreeFor($className, $rootID = null, $childrenMethod = null, $numChildrenMethod = null, $filterFunction = null, $minNodeCount = 30)
 {
     if (!$childrenMethod) {
         $childrenMethod = 'ChildFolders';
     }
     return parent::getSiteTreeFor($className, $rootID, $childrenMethod, $numChildrenMethod, $filterFunction, $minNodeCount);
 }
开发者ID:nyeholt,项目名称:silverstripe-dynamictemplate,代码行数:7,代码来源:DynamicTemplateAdmin.php


示例13: getEditForm

 /**
  * @return Form
  */
 public function getEditForm($id = null, $fields = null)
 {
     if (!$id) {
         $id = $this->currentPageID();
     }
     $form = parent::getEditForm($id);
     $record = $this->getRecord($id);
     if ($record && !$record->canView()) {
         return Security::permissionFailure($this);
     }
     $newComments = Comment::get()->filter('Moderated', 0);
     $newGrid = new CommentsGridField('NewComments', _t('CommentsAdmin.NewComments', 'New'), $newComments, CommentsGridFieldConfig::create());
     $approvedComments = Comment::get()->filter('Moderated', 1)->filter('IsSpam', 0);
     $approvedGrid = new CommentsGridField('ApprovedComments', _t('CommentsAdmin.ApprovedComments', 'Approved'), $approvedComments, CommentsGridFieldConfig::create());
     $spamComments = Comment::get()->filter('Moderated', 1)->filter('IsSpam', 1);
     $spamGrid = new CommentsGridField('SpamComments', _t('CommentsAdmin.SpamComments', 'Spam'), $spamComments, CommentsGridFieldConfig::create());
     $newCount = '(' . count($newComments) . ')';
     $approvedCount = '(' . count($approvedComments) . ')';
     $spamCount = '(' . count($spamComments) . ')';
     $fields = new FieldList($root = new TabSet('Root', new Tab('NewComments', _t('CommentAdmin.NewComments', 'New') . ' ' . $newCount, $newGrid), new Tab('ApprovedComments', _t('CommentAdmin.ApprovedComments', 'Approved') . ' ' . $approvedCount, $approvedGrid), new Tab('SpamComments', _t('CommentAdmin.SpamComments', 'Spam') . ' ' . $spamCount, $spamGrid)));
     $root->setTemplate('CMSTabSet');
     $actions = new FieldList();
     $form = new Form($this, 'EditForm', $fields, $actions);
     $form->addExtraClass('cms-edit-form');
     $form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
     if ($form->Fields()->hasTabset()) {
         $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
         $form->addExtraClass('center ss-tabset cms-tabset ' . $this->BaseCSSClasses());
     }
     $this->extend('updateEditForm', $form);
     return $form;
 }
开发者ID:krissihall,项目名称:sm_ss,代码行数:35,代码来源:CommentAdmin.php


示例14: init

 /**
  * Provides hook for decorators, so that they can overwrite css
  * and other definitions.
  * 
  * @param bool $skipUpdateInit Set to true to skip the parents updateInit extension
  * 
  * @return void
  *
  * @author Sebastian Diel <[email protected]>
  * @since 20.02.2013
  */
 public function init($skipUpdateInit = false)
 {
     parent::init();
     if (!$skipUpdateInit) {
         $this->extend('updateInit');
     }
 }
开发者ID:silvercart,项目名称:silvercart,代码行数:18,代码来源:SilvercartLeftAndMain.php


示例15: init

 function init()
 {
     parent::init();
     // somehow themed css gets mixed in, remove it
     $reqbe = Requirements::backend();
     foreach ($reqbe->get_css() as $file => $val) {
         if (preg_match('/^themes\\//', $file)) {
             Requirements::block($file);
         }
     }
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-form/jquery.form.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.core.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.widget.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.mouse.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.tabs.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.button.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.position.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.dialog.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery.ui.draggable.js');
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/base/jquery.ui.core.css');
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/base/jquery.ui.dialog.css');
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/base/jquery.ui.theme.css');
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/base/jquery.ui.tabs.css');
     Requirements::clear('jsparty/prototype.js');
     Requirements::javascript(SAPPHIRE_DIR . "/javascript/i18n.js");
     Requirements::add_i18n_javascript('dbplumber/javascript/lang');
     Requirements::javascript("dbplumber/javascript/DatabaseBrowser.js");
     Requirements::javascript("dbplumber/thirdparty/jquery.event.drag-1.4.js");
     Requirements::javascript("dbplumber/thirdparty/jquery.kiketable.colsizable-1.1.js");
     Requirements::javascript("dbplumber/thirdparty/jquery.textarea-expander.js");
     Requirements::css("dbplumber/thirdparty/jquery.kiketable.colsizable-1.1.css");
     Requirements::css("dbplumber/css/DatabaseBrowser_left.css");
     Requirements::css("dbplumber/css/DatabaseBrowser_right.css");
 }
开发者ID:alapini,项目名称:silverstripe-dbplumber,代码行数:35,代码来源:DatabaseBrowser.php


示例16: init

 public function init()
 {
     parent::init();
     if (!$this->request->isAjax()) {
         Requirements::css('timeline/css/notification-wall.css');
     }
 }
开发者ID:helpfulrobot,项目名称:silverstripe-timeline,代码行数:7,代码来源:Timeline.php


示例17: init

 /**
  * Loads the requirements, checks perms, etc. If an ID is in the URL, that becomes the
  * current folder.
  */
 public function init()
 {
     parent::init();
     if (!Permission::check("ADMIN") && !Permission::check("CMS_ACCESS_BrowseFiles")) {
         return Security::permissionFailure($this, _t('KickAssets.PERMISSIONFAIL', 'You do not have permission to access this section of the CMS.'));
     }
     Requirements::clear();
     Requirements::css('kickassets/css/core.css');
     Requirements::css('kickassets/css/kickassets.css');
     Requirements::javascript('kickassets/javascript/jquery.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js');
     Requirements::javascript('kickassets/javascript/apprise/apprise-1.5.full.js');
     Requirements::javascript('kickassets/javascript/jquery.tooltip.js');
     Requirements::css('kickassets/javascript/apprise/apprise.css');
     Requirements::javascript('kickassets/javascript/kickassets_ui.js');
     Requirements::javascript('kickassets/javascript/chosen/chosen.jquery.js');
     Requirements::css('kickassets/javascript/chosen/chosen.css');
     Requirements::javascript('kickassets/javascript/jquery.form.js');
     Requirements::javascript('kickassets/javascript/kickassets.js');
     Requirements::css('kickassets/css/kickassets_ui.css');
     if ($this->getRequest()->param('ID')) {
         $this->currentFolder = DataObject::get_by_id("Folder", (int) $this->getRequest()->param('ID'));
         $this->currentPath = KickAssetUtil::relative_asset_dir($this->currentFolder->Filename);
     } else {
         $this->currentFolder = singleton('Folder');
         $this->currentPath = false;
     }
 }
开发者ID:heyday,项目名称:KickAssets,代码行数:32,代码来源:KickAssetAdmin.php


示例18: getEditForm

 /**
  * @return Form
  */
 public function getEditForm($id = null, $fields = null)
 {
     if (!$id) {
         $id = $this->currentPageID();
     }
     $form = parent::getEditForm($id);
     $record = $this->getRecord($id);
     if ($record && !$record->canView()) {
         return Security::permissionFailure($this);
     }
     $commentsConfig = GridFieldConfig::create()->addComponents(new GridFieldFilterHeader(), new GridFieldDataColumns(), new GridFieldSortableHeader(), new GridFieldPaginator(25), new GridFieldDeleteAction(), new GridFieldDetailForm(), new GridFieldExportButton(), new GridFieldEditButton(), new GridFieldDetailForm());
     $needs = new GridField('Comments', _t('CommentsAdmin.NeedsModeration', 'Needs Moderation'), Comment::get()->where('Moderated = 0'), $commentsConfig);
     $moderated = new GridField('CommentsModerated', _t('CommentsAdmin.CommentsModerated'), Comment::get()->where('Moderated = 1'), $commentsConfig);
     $fields = new FieldList($root = new TabSet('Root', new Tab('NeedsModeration', _t('CommentAdmin.NeedsModeration', 'Needs Moderation'), $needs), new Tab('Comments', _t('CommentAdmin.Moderated', 'Moderated'), $moderated)));
     $root->setTemplate('CMSTabSet');
     $actions = new FieldList();
     $form = new Form($this, 'EditForm', $fields, $actions);
     $form->addExtraClass('cms-edit-form');
     $form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
     if ($form->Fields()->hasTabset()) {
         $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
         $form->addExtraClass('center ss-tabset cms-tabset ' . $this->BaseCSSClasses());
     }
     $this->extend('updateEditForm', $form);
     return $form;
 }
开发者ID:roed,项目名称:silverstripe-comments,代码行数:29,代码来源:CommentAdmin.php


示例19: Breadcrumbs

 /**
  * @param bool $unlinked
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     $items[0]->Link = singleton('CloudinaryAdmin')->Link('show');
     $items->push(new ArrayData(array('Title' => _t('CloudinaryAdmin.Upload', 'Upload'), 'Link' => $this->Link())));
     return $items;
 }
开发者ID:helpfulrobot,项目名称:mademedia-silverstripe-cloudinary,代码行数:11,代码来源:CloudinaryFileAddController.php


示例20: init

 public function init()
 {
     parent::init();
     Requirements::css(SS_NR_BASE . '/css/NewRelicPerformanceReport.css');
     Requirements::add_i18n_javascript(SS_NR_BASE . '/javascript/lang');
     Requirements::javascript(SS_NR_BASE . '/javascript/NewRelicPerformanceReport.js');
     Requirements::javascript(SS_NR_BASE . '/thirdparty/nnnick/chart-js/chart.min.js');
 }
开发者ID:webbuilders-group,项目名称:silverstripe-new-relic,代码行数:8,代码来源:NewRelicPerformanceReport.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Legacy_Utils类代码示例发布时间:2022-05-23
下一篇:
PHP Lead类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap