255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'warehouse' => 'ID warehouse', 'number' => 'Number of warehouse', ]; } /** * @return Warehouse|null */ public function getWarehouse() { return Warehouse::findOne($this->warehouse); } /** * Формирует заголовок "1.2.3" где 1 - компания, 2 - номер склада, 3 - номер стеллажа * * @return string */ public function toFormTitle() { return $this->getWarehouse()->company . '.' . $this->getWarehouse()->number . '.' . $this->number; } }