/** * Gets the options for the content mappers * @return array */ protected function getContentMapperOptions($modelName) { $contentMappers = $this->contentService->getContentMappersForType($modelName); foreach ($contentMappers as $id => $contentMapper) { $contentMappers[$id] = $id; } $contentMappers = array('' => '---') + $contentMappers; return $contentMappers; }
/** * Action to get the available content mappers for a model * @param \ride\web\cms\orm\ContentService $contentService * @param string $model Name of the model * @return null */ public function modelMappersAction(ContentService $contentService, $model) { $contentMappers = $contentService->getContentMappersForType($model); $this->setJsonView(array($model => array_keys($contentMappers))); }