Xpressengine\Menu\MenuRepository::findItem PHP Method

findItem() public method

Find a menu item
public findItem ( string $id, array $with = [] ) : MenuItem
$id string menu item identifier
$with array relation
return Xpressengine\Menu\Models\MenuItem
    public function findItem($id, $with = []);

Usage Example

Ejemplo n.º 1
0
 /**
  * Find a menu item
  *
  * @param string $id   menu item identifier
  * @param array  $with relation
  * @return MenuItem
  */
 public function findItem($id, $with = [])
 {
     if (!isset($this->itemBag[$id])) {
         $this->itemBag[$id] = $this->repo->findItem($id, $with);
     }
     return $this->itemBag[$id];
 }
All Usage Examples Of Xpressengine\Menu\MenuRepository::findItem