/** * * @param array $options An associative array with the following * key value/pairs: * - id: The id of the feed item to return * @param Conjoon_BeanContext_Decoratable $model * * @return Conjoon_Modules_Groupware_Feeds_Item_Dto */ protected function _build(array $options, Conjoon_BeanContext_Decoratable $model) { $id = $options['id']; $accountId = $options['accountId']; $isImageEnabled = $options['isImageEnabled']; /** * @see Conjoon_Modules_Groupware_Feeds_Item_Filter_Item */ require_once 'Conjoon/Modules/Groupware/Feeds/Item/Filter/Item.php'; /** * @see Conjoon_BeanContext_Decorator */ require_once 'Conjoon/BeanContext/Decorator.php'; $responseType = Conjoon_Modules_Groupware_Feeds_Item_Filter_Item::CONTEXT_ITEM_RESPONSE; if ($isImageEnabled) { $responseType = Conjoon_Modules_Groupware_Feeds_Item_Filter_Item::CONTEXT_ITEM_RESPONSE_IMG; } $itemResponseFilter = new Conjoon_Modules_Groupware_Feeds_Item_Filter_Item(array(), $responseType); $itemModel = new Conjoon_BeanContext_Decorator($model, $itemResponseFilter); $item = $itemModel->getItemAsDto($id); return $item; }