Example #1
0
 public function getData()
 {
     $objectClass = Object::findById($this->objectId)->object_class;
     $object = new $objectClass();
     $this->data = $object->attributeLabels();
     return parent::getData();
 }
 public function getData()
 {
     $query = new Query();
     $query->select(Property::tableName() . '.id, ' . Property::tableName() . '.name')->from(Property::tableName());
     $query->leftJoin(PropertyGroup::tableName(), PropertyGroup::tableName() . '.id = ' . Property::tableName() . '.property_group_id');
     $query->andWhere([PropertyGroup::tableName() . '.object_id' => $this->objectId]);
     $command = $query->createCommand();
     $this->data = ArrayHelper::map($command->queryAll(), 'id', 'name');
     return parent::getData();
 }
 public function getData()
 {
     $this->data = ArrayHelper::map(Category::find()->asArray()->all(), 'id', 'name');
     return parent::getData();
 }