| @@ 35-51 (lines=17) @@ | ||
| 32 | return $this->realLocales; |
|
| 33 | } |
|
| 34 | ||
| 35 | public function getBlockTypes() |
|
| 36 | { |
|
| 37 | if (!empty($this->blockTypes)) { |
|
| 38 | return $this->blockTypes; |
|
| 39 | } |
|
| 40 | ||
| 41 | $container = $this->getConfigurationPool()->getContainer(); |
|
| 42 | $types = $container->getParameter('alpixel_cms.blocks'); |
|
| 43 | $this->blockTypes = $types; |
|
| 44 | foreach ($this->blockTypes as $key => $array) { |
|
| 45 | if ($instanceAdmin = $this->getConfigurationPool()->getAdminByClass($array['class'])) { |
|
| 46 | $this->blockTypes[$key]['admin'] = $instanceAdmin; |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| 50 | return $this->blockTypes; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getCMSTypes() |
|
| 54 | { |
|
| @@ 53-69 (lines=17) @@ | ||
| 50 | return $this->blockTypes; |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getCMSTypes() |
|
| 54 | { |
|
| 55 | if (!empty($this->cmsTypes)) { |
|
| 56 | return $this->cmsTypes; |
|
| 57 | } |
|
| 58 | ||
| 59 | $container = $this->getConfigurationPool()->getContainer(); |
|
| 60 | $types = $container->getParameter('alpixel_cms.content_types'); |
|
| 61 | $this->cmsTypes = $types; |
|
| 62 | foreach ($this->cmsTypes as $key => $array) { |
|
| 63 | if ($instanceAdmin = $this->getConfigurationPool()->getAdminByClass($array['class'])) { |
|
| 64 | $this->cmsTypes[$key]['admin'] = $instanceAdmin; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| 68 | return $this->cmsTypes; |
|
| 69 | } |
|
| 70 | ||
| 71 | protected function getCMSEntityTypes() |
|
| 72 | { |
|