eZ\Publish\Core\FieldType\FieldType::getValidatorConfigurationSchema PHP Method

getValidatorConfigurationSchema() public method

Returns a schema for the validator configuration expected by the FieldType.
See also: FieldTypeInterface::getValidatorConfigurationSchema() This implementation returns a three dimensional map containing for each validator configuration referenced by identifier a map of supported parameters which are defined by a type and a default value (see example). array( 'stringLength' => array( 'minStringLength' => array( 'type' => 'int', 'default' => 0, ), 'maxStringLength' => array( 'type' => 'int' 'default' => null, ) ), );
    public function getValidatorConfigurationSchema()
    {
        return $this->validatorConfigurationSchema;
    }

Usage Example

Beispiel #1
0
 /**
  * Returns a schema for the validator configuration expected by the FieldType.
  *
  * Returns an arbitrary value, representing a schema for the validator
  * configuration of the FieldType.
  *
  * Explanation: There are no possible generic schemas for defining settings
  * input, which is why no schema for the return value of this method is
  * defined. It is up to the implementer to define and document a schema for
  * the return value and document it. In addition, it is necessary that all
  * consumers of this interface (e.g. Public API, REST API, GUIs, ...)
  * provide plugin mechanisms to hook adapters for the specific FieldType
  * into. These adapters then need to be either shipped with the FieldType
  * or need to be implemented by a third party. If there is no adapter
  * available for a specific FieldType, it will not be usable with the
  * consumer.
  *
  * Best practice:
  *
  * It is considered best practice to return a hash map, which contains
  * rudimentary settings structures, like e.g. for the "ezstring" FieldType
  *
  * <code>
  *  array(
  *      'stringLength' => array(
  *          'minStringLength' => array(
  *              'type'    => 'int',
  *              'default' => 0,
  *          ),
  *          'maxStringLength' => array(
  *              'type'    => 'int'
  *              'default' => null,
  *          )
  *      ),
  *  );
  * </code>
  *
  * @return mixed
  */
 public function getValidatorConfigurationSchema()
 {
     return $this->internalFieldType->getValidatorConfigurationSchema();
 }