/** * Loads ObjectFS entity by id * * @param id int Entity (dir,file,...) id * @param fs RM_ObjectFs_Filesystem Search entity only within this fs. * @return RM_ObjectFs_Entity | NULL */ public function entityLoadById($id, RM_ObjectFs_Filesystem $fs = NULL) { if (isNull($entity = $this->_fileStorage->loadObjectById($id))) { return $entity; } if (!isNull($fs) and $entity->_getFsId() != $fs->id()) { $entity = M('Base')->null(); } else { $this->access($entity, 'OFS-READ-INFO'); if (!isNull($parent = $entity->getParent())) { $this->access($parent, 'OFS-READ-CONTENT'); } } return $entity; }
public function loadById($id) { return $this->_object->loadObjectById($id); }
/** * Return template object by id. * * @param id int object identifier * * @return RM_MailTemplate_Template */ public function loadTemplateById($id) { return $this->_templateStorage->loadObjectById($id); }
/** * Returns news by id * * @param int $id * @return RM_News_Object */ public function loadNewsById($id) { return $this->_news->loadObjectById($id); }