Example #1
0
 function validate(array $def)
 {
     if (!array_key_exists('size', $def)) {
         throw new \ErrorException("Image property definition in type '{$this->app->controller->type}' is missing required property 'size'");
     }
     if (!array_key_exists('default', $def['size'])) {
         throw new \ErrorException("Image property definition in type '{$this->app->controller->type}' is missing required default size");
     }
     return parent::validate($def);
 }