Piwik\Plugins\CustomVariables\CustomVariables::getMaxLengthCustomVariables PHP Method

getMaxLengthCustomVariables() public static method

There are also some hardcoded places in JavaScript
public static getMaxLengthCustomVariables ( ) : integer
return integer
    public static function getMaxLengthCustomVariables()
    {
        return 200;
    }

Usage Example

コード例 #1
0
ファイル: Model.php プロジェクト: a4tunado/piwik
 public function addCustomVariable()
 {
     $dbTable = $this->getDbTableName();
     $index = $this->getHighestCustomVarIndex() + 1;
     $maxLen = CustomVariables::getMaxLengthCustomVariables();
     Db::exec(sprintf('ALTER TABLE %s ', $dbTable) . sprintf('ADD COLUMN custom_var_k%d VARCHAR(%d) DEFAULT NULL,', $index, $maxLen) . sprintf('ADD COLUMN custom_var_v%d VARCHAR(%d) DEFAULT NULL;', $index, $maxLen));
     return $index;
 }
All Usage Examples Of Piwik\Plugins\CustomVariables\CustomVariables::getMaxLengthCustomVariables