Synchronizes a custom layout with its master layout
public static synchronizeCustomLayout ( |
||
$customLayout |
/** * @param $id * @return mixed|null|CustomLayout * @throws \Exception */ public static function getById($id) { if ($id === null) { throw new \Exception("CustomLayout id is null"); } $cacheKey = "customlayout_" . $id; try { $customLayout = \Zend_Registry::get($cacheKey); if (!$customLayout) { throw new \Exception("Custom Layout in registry is null"); } } catch (\Exception $e) { try { $customLayout = new self(); $customLayout->getDao()->getById($id); Object\Service::synchronizeCustomLayout($customLayout); \Zend_Registry::set($cacheKey, $customLayout); } catch (\Exception $e) { \Logger::error($e); return null; } } return $customLayout; }