예제 #1
0
 /**
  *	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;
 }
예제 #2
0
파일: class.php 프로젝트: evilgeny/bob
 public function loadById($id)
 {
     return $this->_object->loadObjectById($id);
 }
예제 #3
0
 /**
  *	Return template object by id.
  *
  *	@param		id		int		object identifier
  *
  *	@return		RM_MailTemplate_Template
  */
 public function loadTemplateById($id)
 {
     return $this->_templateStorage->loadObjectById($id);
 }
예제 #4
0
 /**
  * Returns news by id
  *
  * @param	int		$id
  * @return	RM_News_Object
  */
 public function loadNewsById($id)
 {
     return $this->_news->loadObjectById($id);
 }