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


PHP BlockController类代码示例

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


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

示例1: render

 /**
  * @param BlockController $block
  * @param DecoratorParams $params
  *
  * @return mixed
  */
 public function render(BlockController $block, DecoratorParams $params)
 {
     $title = $block->getTitle();
     $header = '';
     if ($title) {
         $header = '<div class="unit-header"><div class="unit-title"><span>' . $title . '</span></div></div>';
     }
     return '<div class="unit ' . $block->getCssClassName() . '">' . $header . '<div class="unit-content">' . $block->getContent() . '</div></div>';
 }
开发者ID:kendolabdev,项目名称:kendoplatform,代码行数:15,代码来源:UnitDecorator.php

示例2: render

 /**
  * @param BlockController $block
  * @param DecoratorParams $params
  *
  * @return mixed
  */
 public function render(BlockController $block, DecoratorParams $params)
 {
     $title = $block->getTitle();
     $header = '';
     if ($title) {
         $header = '<div class="panel-header"><div class="panel-header"><span>' . $title . '</span></div></div>';
     }
     return '<div class="panel ' . $params->get('scheme') . ' ' . $block->getCssClassName() . '">' . $header . '<div class="panel-body">' . $block->getContent() . '</div></div>';
 }
开发者ID:kendolabdev,项目名称:kendoplatform,代码行数:15,代码来源:CalloutDecorator.php

示例3: getController

 /**
  * @throws Exception
  *
  * @return BlockController
  */
 public function getController()
 {
     if ($this->controller) {
         return $this->controller;
     }
     foreach (array_reverse(ClassInfo::ancestry($this->class)) as $blockClass) {
         $controllerClass = "{$blockClass}_Controller";
         if (class_exists($controllerClass)) {
             break;
         }
     }
     if (!class_exists($controllerClass)) {
         throw new Exception("Could not find controller class for {$this->classname}");
     }
     $this->controller = Injector::inst()->create($controllerClass, $this);
     $this->controller->init();
     return $this->controller;
 }
开发者ID:sheadawson,项目名称:silverstripe-blocks,代码行数:23,代码来源:Block.php

示例4: save

		public function save($args) {		
			$args['fOnstateID'] = ($args['fOnstateID'] != '') ? $args['fOnstateID'] : 0;
			$args['fID'] = ($args['fID'] != '') ? $args['fID'] : 0;
			$args['maxWidth'] = (intval($args['maxWidth']) > 0) ? intval($args['maxWidth']) : 0;
			$args['maxHeight'] = (intval($args['maxHeight']) > 0) ? intval($args['maxHeight']) : 0;
			parent::save($args);
		}
开发者ID:remkoj,项目名称:concrete5,代码行数:7,代码来源:controller.php

示例5: save

 public function save($args)
 {
     $db = Loader::db();
     $args['showArrows'] = intval($args['showArrows']);
     $args['loopSequence'] = intval($args['loopSequence']);
     parent::save($args);
 }
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:7,代码来源:next_previous.php

示例6: save

		function save($data) { 
			$args['fID']    = intval($data['fID']);	
			$args['width']  = (intval($data['width'])>0)  ? intval($data['width'])  : 425;
			$args['height'] = (intval($data['height'])>0) ? intval($data['height']) : 334;		
			
			parent::save($args);
		}				
开发者ID:rii-J,项目名称:concrete5-de,代码行数:7,代码来源:controller.php

示例7: save

 public function save($args)
 {
     $args['field_2_image_fID'] = empty($args['field_2_image_fID']) ? 0 : $args['field_2_image_fID'];
     $args['field_3_image_fID'] = empty($args['field_3_image_fID']) ? 0 : $args['field_3_image_fID'];
     $args['field_4_image_fID'] = empty($args['field_4_image_fID']) ? 0 : $args['field_4_image_fID'];
     $args['field_5_image_fID'] = empty($args['field_5_image_fID']) ? 0 : $args['field_5_image_fID'];
     parent::save($args);
 }
开发者ID:robchenski,项目名称:ids,代码行数:8,代码来源:controller.php

示例8: save

		function save($data) { 
			$args['title'] = isset($data['title']) ? trim($data['title']) : '';
			$args['videoURL'] = isset($data['videoURL']) ? trim($data['videoURL']) : '';
			$args['vHeight'] = isset($data['vHeight']) ? trim($data['vHeight']) : '';
			$args['vWidth'] = isset($data['vWidth']) ? trim($data['vWidth']) : '';
			$args['vPlayer'] = ($data['vPlayer']==1) ? 1 : 0;
			parent::save($args);
		}
开发者ID:notzen,项目名称:concrete5,代码行数:8,代码来源:controller.php

示例9: save

 function save($args)
 {
     $args['displayPagesIncludeSelf'] = $args['displayPagesIncludeSelf'] ? 1 : 0;
     $args['displayPagesCID'] = $args['displayPagesCID'] ? $args['displayPagesCID'] : 0;
     $args['displaySubPageLevelsNum'] = $args['displaySubPageLevelsNum'] > 0 ? $args['displaySubPageLevelsNum'] : 0;
     $args['displayUnavailablePages'] = $args['displayUnavailablePages'] ? 1 : 0;
     parent::save($args);
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:8,代码来源:autonav.php

示例10: save

 public function save($args)
 {
     $ak = $this->loadAttribute();
     $c = Page::getByID($_REQUEST['cID'], 'RECENT');
     $nvc = $c->getVersionToModify();
     $ak->saveAttributeForm($nvc);
     $nvc->refreshCache();
     parent::save($args);
 }
开发者ID:VonUniGE,项目名称:concrete5-1,代码行数:9,代码来源:controller.php

示例11: save

 public function save($values)
 {
     $repository = array("title" => $values["title"], "user" => $values["user"]);
     $db = Loader::db();
     $db->query("DELETE FROM btGithubRepositories WHERE bID = ?", array(intval($this->bID)));
     $repos = $values["repos"];
     foreach ($repos as $key => $rp) {
         $db->query("INSERT INTO btGithubRepositories (bID, repos) VALUES (?, ?)", array($this->bID, $rp));
     }
     parent::save($repository);
 }
开发者ID:holyshared,项目名称:developer-package,代码行数:11,代码来源:controller.php

示例12: delete

		function delete() {
			$ip = Loader::helper('validation/ip');
			if (!$ip->check()) {
				$this->set('invalidIP', $ip->getErrorMessage());			
				return;
			}
			$c = Page::getCurrentPage();
			$E = new GuestBookBlockEntry($this->bID, $c->getCollectionID());
			$bo = $this->getBlockObject();
			$E->removeAllEntries( $c->getCollectionID() );
			parent::delete();
		}
开发者ID:nveid,项目名称:concrete5,代码行数:12,代码来源:guestbook.php

示例13: save

		public function save($args) {		
			$args['fOnstateID'] = ($args['fOnstateID'] != '') ? $args['fOnstateID'] : 0;
			$args['fID'] = ($args['fID'] != '') ? $args['fID'] : 0;
			$args['maxWidth'] = (intval($args['maxWidth']) > 0) ? intval($args['maxWidth']) : 0;
			$args['maxHeight'] = (intval($args['maxHeight']) > 0) ? intval($args['maxHeight']) : 0;
			switch (intval($args['linkType'])) {
				case 1:
					$args['externalLink'] = '';
					break;
				case 2:
					$args['internalLinkCID'] = 0;
					break;
				default:
					$args['externalLink'] = '';
					$args['internalLinkCID'] = 0;
					break;
			}
			unset($args['linkType']); //this doesn't get saved to the database (it's only for UI usage)
			parent::save($args);
		}
开发者ID:nbourguig,项目名称:concrete5,代码行数:20,代码来源:controller.php

示例14: save

 function save($args)
 {
     /* Flush any existing Timeline Components */
     $this->deleteExistingUserOrHashSettings();
     //if any exist, we remove them
     /* Flush the cache */
     $this->flushFullTimelineCache();
     /* Fix the checkbox fields */
     $args = $this->fixCheckboxFields($args);
     $userOrHash = empty($_POST['userOrHash']) ? array() : $_POST['userOrHash'];
     $userOrHashValues = empty($_POST['userOrHashValue']) ? array() : $_POST['userOrHashValue'];
     /*
      * Get the tokens and setup the default Timeline Component if user is
      * authenticating or reauthenticating a Twitter account.
      */
     if (isset($_POST['oAuthPIN'])) {
         $twitterObj = $this->getTwitterOAuthObject($_POST['oAuthRequestToken'], $_POST['oAuthRequestTokenSecret']);
         $access_token = $twitterObj->getAccessToken($_POST['oAuthPIN']);
         $args['oAuthToken'] = $access_token['oauth_token'];
         $args['oAuthTokenSecret'] = $access_token['oauth_token_secret'];
         $args['userName'] = $access_token['screen_name'];
         $args['userID'] = $access_token['user_id'];
         array_unshift($userOrHash, 1);
         array_unshift($userOrHashValues, $args['userName']);
     }
     if (!empty($userOrHash) && !empty($userOrHashValues)) {
         $userOrHashSettingsArray = array();
         /* Combine the two arrays eliminating any items where either array value is null */
         foreach ($userOrHash as $post_array_key => $post_array_value) {
             if (!empty($post_array_value) && !empty($userOrHashValues[$post_array_key])) {
                 array_push($userOrHashSettingsArray, array($post_array_value => $userOrHashValues[$post_array_key]));
             }
         }
         $this->saveUserOrHashSettingsArray($userOrHashSettingsArray);
     }
     parent::save($args);
 }
开发者ID:robchenski,项目名称:ids,代码行数:37,代码来源:controller.php

示例15: save

 function save($args)
 {
     $args['content'] = Loader::helper('content')->translateTo($args['content']);
     parent::save($args);
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:5,代码来源:content.php


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