... The difference to {@link MeasurableSetting} is that these fields will be stored in the actual site table whereas MeasurableSetting will be stored in a site_settings table. For this reasons MeasurableProperty can be used only for some specific fields that already exist in site table such as "ecommerce", "sitesearch" etc. See {@link \Piwik\Settings\Setting}.
Наследование: extends Piwik\Settings\Setting
Пример #1
0
 public function __construct($idSite)
 {
     $name = 'urls';
     $pluginName = 'WebsiteMeasurable';
     $defaultValue = array('http://siteUrl.com/', 'http://siteUrl2.com/');
     $type = FieldConfig::TYPE_ARRAY;
     parent::__construct($name, $defaultValue, $type, $pluginName, $idSite);
 }
Пример #2
0
 /**
  * @internal
  * @param $name
  * @param $defaultValue
  * @param $type
  * @param $configureCallback
  * @return MeasurableProperty
  * @throws Exception
  */
 protected function makeProperty($name, $defaultValue, $type, $configureCallback)
 {
     $setting = new MeasurableProperty($name, $defaultValue, $type, $this->pluginName, $this->idSite);
     $setting->setConfigureCallback($configureCallback);
     $this->addSetting($setting);
     return $setting;
 }