30 lines
705 B
PHP
Executable File
30 lines
705 B
PHP
Executable File
<?php
|
|
|
|
class ElementImage extends ElementString {
|
|
|
|
private static $schema;
|
|
|
|
public static function getDefinition () {
|
|
|
|
if ( self::$schema )
|
|
return static::$schema;
|
|
|
|
return static::$schema= self::getSchema(array(
|
|
'minlength' => ElementInteger::getSchema(array('default' => false, 'null' => true)),
|
|
'maxlength' => ElementInteger::getSchema(array('default' => false, 'null' => true)),
|
|
'default' => ElementBoolean::getSchema(array('default' => false, 'null' => true)),
|
|
'null' => ElementBoolean::getSchema(array('default' => true, 'null' => true))
|
|
));
|
|
|
|
}
|
|
|
|
public static function getSchema ( $params = array() ) {
|
|
|
|
$params['type'] = 'image';
|
|
return $params;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|