public function up()
 {
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'LIST', 'name' => 'LIST', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'PICTURE', 'name' => 'Picture', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'LINK', 'name' => 'Link', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'TEXTAREA', 'name' => 'Textarea', 'is_system' => 1]);
 }
Exemplo n.º 2
0
 public function getValue($event)
 {
     if ($this->value === null) {
         return EavHelper::generateId();
     } else {
         return call_user_func($this->value, $event);
     }
 }
 public function up()
 {
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'INTEGER', 'name' => 'Integer', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'TEXT', 'name' => 'Text', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'FLOAT', 'name' => 'Float', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'DATETIME', 'name' => 'Datetime', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'DATE', 'name' => 'Date', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'TIME', 'name' => 'Time', 'is_system' => 1]);
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'HTML', 'name' => 'HTML', 'is_system' => 1]);
 }
 public function up()
 {
     $this->insert('{{%attribute_types}}', ['id' => EavHelper::generateId(), 'alias' => 'BOOLEAN', 'name' => 'Boolean', 'is_system' => 1]);
 }