當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataExtension::__construct方法代碼示例

本文整理匯總了PHP中DataExtension::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataExtension::__construct方法的具體用法?PHP DataExtension::__construct怎麽用?PHP DataExtension::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataExtension的用法示例。


在下文中一共展示了DataExtension::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct()
 {
     $this->allowedStates = self::$allowed_states;
     $this->allowedCountries = self::$allowed_countries;
     $this->postcodeRegex = self::$postcode_regex;
     parent::__construct();
 }
開發者ID:8secs,項目名稱:cocina,代碼行數:7,代碼來源:Addressable.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // This may get called before the schema is created.
     if (!DB::getConn()->isSchemaUpdating()) {
         HtmlEditorConfig::get('cms')->setOption('viewtemplate', ViewTemplate::get()->map('Title')->toArray());
     }
 }
開發者ID:helpfulrobot,項目名稱:satrun77-viewtemplate,代碼行數:8,代碼來源:ViewTemplatePageExtension.php

示例3: __construct

 /**
  * @param $allowed
  */
 public function __construct($allowed)
 {
     parent::__construct();
     if (!is_array($allowed)) {
         $allowed = func_get_args();
     }
     $this->allowed = $allowed;
 }
開發者ID:helpfulrobot,項目名稱:heyday-silverstripe-abtesting,代碼行數:11,代碼來源:ABTestingExtension.php

示例4: __construct

 /**
  * @param Config_ForClass $config
  */
 public function __construct(Config_ForClass $config = null)
 {
     parent::__construct();
     $this->config = $config ?: Config::inst()->forClass(__CLASS__);
     if ($memLimit = $this->config->get('memory')) {
         increase_memory_limit_to($memLimit);
     }
 }
開發者ID:helpfulrobot,項目名稱:heyday-silverstripe-optimisedimage,代碼行數:11,代碼來源:ResampleImage.php

示例5: array

 /**
  * @param Array|String $searchFields Comma-separated list (or array) of database column names
  *  that can be searched on. Used for generation of the database index defintions.
  */
 function __construct($searchFields = array())
 {
     if (is_array($searchFields)) {
         $this->searchFields = implode(',', $searchFields);
     } else {
         $this->searchFields = $searchFields;
     }
     parent::__construct();
 }
開發者ID:nomidi,項目名稱:sapphire,代碼行數:13,代碼來源:FulltextSearchable.php

示例6: __construct

 /**
  * @param Array|String $searchFields Comma-separated list (or array) of database column names
  *  that can be searched on. Used for generation of the database index defintions.
  */
 public function __construct($searchFields = array())
 {
     if (is_array($searchFields)) {
         $this->searchFields = '"' . implode('","', $searchFields) . '"';
     } else {
         $this->searchFields = $searchFields;
     }
     parent::__construct();
 }
開發者ID:ivoba,項目名稱:silverstripe-framework,代碼行數:13,代碼來源:FulltextSearchable.php

示例7: __construct

 public function __construct($tab = '', $useCMSFieldsAlways = false, $profileRelation = '')
 {
     parent::__construct();
     $this->tab = $tab;
     $this->useCMSFieldsAlways = $useCMSFieldsAlways;
     if ($profileRelation) {
         static::$connected_relations[] = $profileRelation;
         $this->hasSetRelationForHidingFromFieldLists = true;
     }
 }
開發者ID:spekulatius,項目名稱:ss-social-feed,代碼行數:10,代碼來源:HasProfiles.php

示例8: __construct

 public function __construct()
 {
     $this->allowedStates = self::$allowed_states;
     $this->allowedCountries = self::$allowed_countries;
     if (!empty($customRegex = Config::inst()->get('Addressable', 'set_postcode_regex'))) {
         self::set_postcode_regex($customRegex);
     }
     $this->postcodeRegex = self::$postcode_regex;
     parent::__construct();
 }
開發者ID:alexoconner,項目名稱:silverstripe-addressable,代碼行數:10,代碼來源:Addressable.php

示例9: __construct

 public function __construct($name = 'Title', $parentRel = null, $enforceParity = false)
 {
     parent::__construct();
     if (!empty($parentRel)) {
         $this->parentRel = $parentRel;
     }
     if (!empty($name)) {
         $this->name = $name;
     }
     $this->enforceParity = $enforceParity;
 }
開發者ID:helpfulrobot,項目名稱:nightjar-ss-slug,代碼行數:11,代碼來源:Slug.php

示例10: __construct

 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $appId = Config::inst()->get('VkControllerExtension', 'app_id');
     $secret = Config::inst()->get('VkControllerExtension', 'api_secret');
     if (!$appId || !$secret) {
         return null;
     }
     if (session_status() !== PHP_SESSION_ACTIVE) {
         Session::start();
     }
 }
開發者ID:rchntrl,項目名稱:silverstripe-vk-connect,代碼行數:15,代碼來源:VkControllerExtension.php

示例11: __construct

 /**
  * @param $destFolder The folder to save the cached site into.
  *   This needs to be set in framework/static-main.php as well through the {@link $cacheBaseDir} variable.
  * @param $fileExtension  The file extension to use, e.g 'html'.  
  *   If omitted, then each page will be placed in its own directory, 
  *   with the filename 'index.html'.  If you set the extension to PHP, then a simple PHP script will
  *   be generated that can do appropriate cache & redirect header negotation.
  */
 public function __construct($destFolder = 'cache', $fileExtension = null)
 {
     // Remove trailing slash from folder
     if (substr($destFolder, -1) == '/') {
         $destFolder = substr($destFolder, 0, -1);
     }
     $this->destFolder = $destFolder;
     if ($fileExtension) {
         $this->fileExtension = $fileExtension;
     }
     parent::__construct();
 }
開發者ID:spark-green,項目名稱:silverstripe-staticpublishqueue,代碼行數:20,代碼來源:FilesystemPublisher.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     DataObject::set_validation_enabled(true);
 }
開發者ID:svandragt,項目名稱:silverstripe-optimisticlocking,代碼行數:5,代碼來源:OptimisticLocking.php

示例13: __construct

 public function __construct(ContentService $service)
 {
     $this->service = $service;
     parent::__construct();
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-cdncontent,代碼行數:5,代碼來源:ImageCachedExtension.php

示例14: __construct

 public function __construct(ElasticaService $service)
 {
     $this->service = $service;
     parent::__construct();
 }
開發者ID:helpfulrobot,項目名稱:weboftalent-elastica,代碼行數:5,代碼來源:Searchable.php

示例15:

	/**
	 * @param Array|String $searchFields Comma-separated list (or array) of database column names
	 *  that can be searched on. Used for generation of the database index defintions.
	 */
	function __construct($searchFields) {
		if(is_array($searchFields)) $this->searchFields = implode(',', $searchFields);
		else $this->searchFields = $searchFields;
		
		parent::__construct();
	}
開發者ID:redema,項目名稱:sapphire,代碼行數:10,代碼來源:FulltextSearchable.php


注:本文中的DataExtension::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。