Esempio n. 1
0
 /**
  * Get the corresponding nav item type for this type object
  */
 public function getNavItem()
 {
     return $this->hasOne(NavItem::className(), ['nav_item_type_id' => 'id'])->where(['nav_item_type' => static::getNummericType()]);
 }
Esempio n. 2
0
 /**
  * Return all nav items related to this object.
  *
  * @return \yii\db\ActiveQuery
  */
 public function getNavItems()
 {
     return $this->hasMany(NavItem::className(), ['nav_id' => 'id']);
 }