Ejemplo n.º 1
0
 /**
  * Получить тип контента по id
  *
  * @param string $nId
  *
  * @return ModuleTopic_EntityContentType|null
  */
 public function GetContentTypeById($nId)
 {
     if (false === ($data = E::ModuleCache()->Get("content_type_{$nId}"))) {
         $data = $this->oMapper->getContentTypeById($nId);
         E::ModuleCache()->Set($data, "content_type_{$nId}", array('content_update', 'content_new'), 60 * 60 * 24 * 1);
     }
     return $data;
 }