Either [[guidAttribute]] or [[idAttribute]] should be enabled.
You can override this method if GUID or ID attribute cannot meet your
requirements.
@return array
194629
public static function primaryKey()
    {
        $model = static::buildNoInitModel();
        if (is_string($model->guidAttribute) && !empty($model->guidAttribute)) {
            return [$model->guidAttribute];
        }
        return [$model->idAttribute];
    }
777211
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\UuidAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true),
            Attributes\TextAttribute::make('code'),
            Attributes\LongTextAttribute::make('description'),
            Attributes\BelongsToAttribute::make('type_id')
                ->setRelationName('type')
                ->setRelationManager(ProductTypeManager::class),
            Attributes\BelongsToAttribute::make('parent_id')
                ->setRelationName('parent')
                ->setRelationManager(ProductManager::class),
            Attributes\BelongsToAttribute::make('supplier_id')
                ->setRelationName('supplier')
                ->setRelationManager(SupplierManager::class),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
254471
public function getSerializableData()
    {
        return [
            'id' => $this->getId(),
            'name' => $this->getName(),
            'description' => $this->getDescription(),
            'profile' => $this->getProfile(),
            'salt' => $this->getSalt(),
            'type' => $this->getType(),
            'value' => $this->getValue(),
        ];
    }
1152898
public function getEnabledExtensions()
    {
        $enabled = [];
        $extensions = $this->getExtensions();

        foreach ($this->getEnabled() as $id) {
            if (isset($extensions[$id])) {
                $enabled[$id] = $extensions[$id];
            }
        }

        return $enabled;
    }
880062
public function getRequiredAttributes()
    {
        return [
            $this->attributePrefix.'chunk'         => $this->getType(),
            $this->attributePrefix.'slot-name'     => $this->slotname,
            $this->attributePrefix.'slot-template' => $this->template,
            $this->attributePrefix.'page'          => $this->page->getId(),
            $this->attributePrefix.'chunk-id'      => $this->getId(),
            $this->attributePrefix.'has-content'   => $this->hasContent(),
        ];
    }
829863
protected function resolveNameID()
    {
        if ($this->name !== null) {
            $name = $this->name;
            $id   = $this->name;
        } elseif ($this->hasModel()) {
            $name = Html::getInputName($this->model, $this->attribute);
            $id   = Html::getInputId($this->model, $this->attribute);
        } else {
            throw new \yii\base\Exception('Class must specify "model" and "attribute" or "name" property values.');
        }
        return [$name, $id];
    }
543718
public function getTooltipAttributes():array
    {
        if ($this->tooltip !== null) {
            $attrs = $this->tooltipOptions;
            $attrs['data-toggle'] = 'tooltip';
            $attrs['title'] = $this->tooltip;
            return $attrs;
        }
        return [];
    }
279740
public function getRawAttributes(): array
    {
        $attributes = $this->wrappedEntity->getEntityAttributes();

        foreach ($this->entityMap->getNonEmbeddedRelationships() as $relation) {
            unset($attributes[$relation]);
        }

        if ($this->entityMap->getInheritanceType() == 'single_table') {
            $attributes = $this->addDiscriminatorColumn($attributes);
        }

        $attributes = $this->entityMap->getColumnNamesFromAttributes($attributes);

        $attributes = $this->flattenEmbeddables($attributes);

        $foreignKeys = $this->getForeignKeyAttributes();

        return $this->mergeForeignKeysWithAttributes($foreignKeys, $attributes);
    }
650591
public function getRefId()
    {
        if ($this->refIdAttribute == $this->guidAttribute) {
            return $this->getGUID();
        }
        if ($this->refIdAttribute == $this->idAttribute) {
            return $this->getID();
        }
        return $this->{$this->refIdAttribute};
    }
538481
public function getMappedAttributes()
    {
        $mappedArrayForApiRequest = [];
        $requestAttributes = $this->request->getData();
        foreach ($requestAttributes as $key => $value) {
            if (array_key_exists($key, $this->mappingRequestToOtherRequestAttributes)) {
                $mappedArrayForApiRequest[$this->mappingRequestToOtherRequestAttributes[$key]] = $value;
            }
        }

        return $mappedArrayForApiRequest;
    }
1000566
public function getAttributes()
    {
        $categorizableConfig = Config::get('amethyst.category.data.categorizable.attributes.categorizable.options');

        return [
            Attributes\IdAttribute::make(),
            Attributes\BelongsToAttribute::make('category_id')
                ->setRelationName('category')
                ->setRelationManager(CategoryManager::class)
                ->setRequired(true),
            Attributes\EnumAttribute::make('categorizable_type', array_keys($categorizableConfig))
                ->setRequired(true),
            Attributes\MorphToAttribute::make('categorizable_id')
                ->setRelationKey('categorizable_type')
                ->setRelationName('categorizable')
                ->setRelations($categorizableConfig)
                ->setRequired(true),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
1141120
public function getMenuAttributes():array
    {
        if ($this->menu !== null) {
            $attrs = [];
            if ($this->menu->getOrientationClass() == 'dropdown') {
                $attrs['id'] = $this->menu->getLabelledBy();
            }
            $attrs['data-toggle']   = 'dropdown';
            $attrs['aria-haspopup'] = 'true';
            $attrs['aria-expanded'] = 'false';
            return $attrs;
        }
        return [];
    }
75026
public function defaultAttributeLabels()
    {
        return [
            'id' => Yii::t('hipanel', 'ID'),
            'remoteid' => Yii::t('hipanel', 'Remote ID'),
            'client' => Yii::t('hipanel', 'Client'),
            'client_id' => Yii::t('hipanel', 'Client'),
            'seller' => Yii::t('hipanel', 'Reseller'),
            'seller_id' => Yii::t('hipanel', 'Reseller'),
            'domain' => Yii::t('hipanel', 'Domain name'),
            'hdomain' => Yii::t('hipanel', 'Domain name'),
            'ns' => Yii::t('hipanel', 'Name Server'),
            'nss' => Yii::t('hipanel', 'Name Servers'),
            'server' => Yii::t('hipanel', 'Server'),
            'account' => Yii::t('hipanel', 'Account'),
            'service' => Yii::t('hipanel', 'Service'),
            'tariff' => Yii::t('hipanel', 'Tariff'),
            'contact' => Yii::t('hipanel', 'Contact'),
            'article' => Yii::t('hipanel', 'Article'),
            'host' => Yii::t('hipanel', 'Host'),
            'bill' => Yii::t('hipanel', 'Bill'),
            'backup' => Yii::t('hipanel', 'Backup'),
            'backuping' => Yii::t('hipanel', 'Backuping'),
            'crontab' => Yii::t('hipanel', 'Crontab'),
            'ip' => Yii::t('hipanel', 'IP'),
            'ips' => Yii::t('hipanel', 'IPs'),
            'mail' => Yii::t('hipanel', 'Mail'),
            'request' => Yii::t('hipanel', 'Request'),
            'db' => Yii::t('hipanel', 'Database'),
            'state' => Yii::t('hipanel', 'Status'),
            'status' => Yii::t('hipanel', 'Status'),
            'states' => Yii::t('hipanel', 'Statuses'),
            'type' => Yii::t('hipanel', 'Type'),
            'types' => Yii::t('hipanel', 'Types'),
            'note' => Yii::t('hipanel', 'Note'),
            'descr' => Yii::t('hipanel', 'Description'),
            'comment' => Yii::t('hipanel', 'Comment'),
            'created_date' => Yii::t('hipanel', 'Registered'),
            'updated_date' => Yii::t('hipanel', 'Last update'),
        ];
    }
592981
public function getFieldsValidDataAttributes()
    {
        $result = [];
        $formConfiguration = $this->getFormObject()->getConfiguration();
        $formResult = $this->getFormObject()->getFormResult();

        foreach ($formConfiguration->getFields() as $field) {
            $fieldName = $field->getName();

            if (false === $formResult->fieldIsDeactivated($field)
                && false === $formResult->forProperty($fieldName)->hasErrors()
            ) {
                $result[self::getFieldDataValidKey($fieldName)] = '1';
            }
        }

        return $result;
    }
1341287
public function getAllAttributes()
    {
        if ($this->node->hasAttributes()) {
            $attributes = [];
            foreach ($this->node->attributes as $attr) {
                $attributes[$attr->name] = $attr->value;
            }

            return $attributes;
        }

        return null;
    }
511420
public function getReferencedAttributes()
    {
        $objMetaModel  = $this->getMetaModel();
        $objAttribute  = $objMetaModel->getAttributeById($this->get('attr_id'));
        $objAttribute2 = $objMetaModel->getAttributeById($this->get('attr_id2'));
        $arrResult     = [];

        if ($objAttribute) {
            $arrResult[] = $objAttribute->getColName();
        }

        if ($objAttribute2) {
            $arrResult[] = $objAttribute2->getColName();
        }

        return $arrResult;
    }
796299
protected function getArrayableAttributes()
    {
        $attributes              = $this->attributes;
        $attributes['firstname'] = $attributes['first_name'];
        $attributes['lastname']  = $attributes['last_name'];

        return $this->getArrayableItems($attributes);
    }