Get menu items by identifier list
public fetchInItem ( array $ids, array $with = [] ) : |
||
$ids | array | menu item identifier |
$with | array | relation |
리턴 |
/** * Get menu items by identifier list * * @param array $ids menu item identifier * @param array $with relation * @return MenuItem[] */ public function fetchInItem(array $ids, $with = []) { $items = $this->repo->fetchInItem($ids, $with); foreach ($items as $item) { $this->bag[$item->getKey()] = $item; } return $items; }
/** * Get menu items by identifier list * * @param array $ids menu item identifier * @param array $with relation * @return MenuItem[] */ public function fetchInItem(array $ids, $with = []) { $items = $this->repo->fetchInItem($ids, $with); foreach ($items as $item) { $key = $this->getItemCacheKey($item->getKey()); $this->cache->put($key, $item); } return $items; }
/** * Get menu item list by identifiers * * @param array $ids menu item identifier list * @param array $with relation * @return MenuItem[] */ public function getItemIn($ids, $with = []) { return $this->repo->fetchInItem((array) $ids, $with); }
/** * Get menu items by identifier list * * @param array $ids menu item identifier * @param array $with relation * @return MenuItem[] */ public function fetchInItem(array $ids, $with = []) { return $this->repo->fetchInItem($ids, $with); }