Ejemplo n.º 1
0
 /**
  * Construct model.
  * @param string $name Name of model.
  */
 public function __construct($name = 'Extension')
 {
     parent::__construct($name);
     $this->addField('canonicalName', tr('Canonical name'), DataType::string());
     $this->addField('name', tr('Name'), DataType::string());
     $this->addField('version', tr('Version'), DataType::string());
     $this->addField('description', tr('Description'), DataType::text());
     $this->addField('enabled', tr('Enabled'), DataType::boolean());
 }
Ejemplo n.º 2
0
 /**
  * Construct file model.
  */
 public function __construct()
 {
     parent::__construct('File');
     $this->addField('path', tr('Path'), DataType::string());
     $this->addField('name', tr('Name'), DataType::string());
     $this->addField('type', tr('Type'), DataType::enum(array('directory', 'file')));
     $this->addField('size', tr('Size'), DataType::integer(DataType::UNSIGNED));
     $this->addField('modified', tr('Modified'), DataType::dateTime());
     $this->addField('created', tr('Created'), DataType::dateTime());
 }