255], [['gallery_id'], 'exist', 'skipOnError' => true, 'targetClass' => Gallery::class, 'targetAttribute' => ['gallery_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'description' => 'Description', 'created_at' => 'Created At', 'gallery_id' => 'Gallery ID', 'path' => 'Path', 'ext' => 'Ext', ]; } /** * Gets query for [[Gallery]]. * * @return \yii\db\ActiveQuery */ public function getGallery() { return $this->hasOne(Gallery::class, ['id' => 'gallery_id']); } }