public function renderPlatformModalContentAction()
    {
        $pids_id = $this->params()->fromQuery('id');

        // Get Cms Platform ID form from  App Tool
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $genericPlatformForm = $melisMelisCoreConfig->getFormMergedAndOrdered('meliscms/tools/meliscms_platform_tool/forms/meliscms_tool_platform_generic_form', 'meliscms_tool_platform_generic_form');

        // Factoring Calendar event and pass to view
        $factory = new \Zend\Form\Factory();
        $formElements = $this->serviceLocator->get('FormElementManager');
        $factory->setFormElementManager($formElements);
        $propertyForm = $factory->createForm($genericPlatformForm);

        $view = new ViewModel();
        $melisEngineTablePlatformIds = $this->getServiceLocator()->get('MelisEngineTablePlatformIds');
        $availablePlatform = $melisEngineTablePlatformIds->getAvailablePlatforms()->toArray();
        // Check if Cms Platform Id is Set
        if (!empty($pids_id)) {
            // Get Platform ID Details
            $platformIdsData = $melisEngineTablePlatformIds->getEntryById($pids_id);
            $platformIdsData = $platformIdsData->current();

            $platformTable = $this->getServiceLocator()->get('MelisCoreTablePlatform');
            $platformData = $platformTable->getEntryById($pids_id);
            $platformData = $platformData->current();

            // Assign Platform name to Element Name of the Form from the App Tool
            $platformIdsData->pids_name_input = $platformData->plf_name;

            // Removing Select input
            $propertyForm->remove('pids_name_select');
            // Binding datas to the Form
            $propertyForm->bind($platformIdsData);

            // Set variable to View
            $view->pids_id = $pids_id;
            $view->tabTitle = 'tr_meliscms_tool_platform_ids_btn_edit';
        } else {
            // Removing Id input and Platform input
            $propertyForm->remove('pids_id');
            $propertyForm->remove('pids_name_input');
            // Set variable to View
            $view->tabTitle = 'tr_meliscms_tool_platform_ids_btn_add';
        }

        $view->setVariable('meliscms_tool_platform_generic_form', $propertyForm);
        $view->setVariable('available_platform', $availablePlatform);
        $view->melisKey = $this->params()->fromRoute('melisKey', '');

        return $view;
    }
public function renderPlatformModalContentAction()
    {
        $pids_id = $this->params()->fromQuery('id');

        // Get Cms Platform ID form from  App Tool
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $genericPlatformForm = $melisMelisCoreConfig->getFormMergedAndOrdered('meliscms/tools/meliscms_platform_tool/forms/meliscms_tool_platform_generic_form', 'meliscms_tool_platform_generic_form');

        // Factoring Calendar event and pass to view
        $factory = new \Zend\Form\Factory();
        $formElements = $this->serviceLocator->get('FormElementManager');
        $factory->setFormElementManager($formElements);
        $propertyForm = $factory->createForm($genericPlatformForm);

        $view = new ViewModel();
        $melisEngineTablePlatformIds = $this->getServiceLocator()->get('MelisEngineTablePlatformIds');
        $availablePlatform = $melisEngineTablePlatformIds->getAvailablePlatforms()->toArray();
        // Check if Cms Platform Id is Set
        if (!empty($pids_id)) {
            // Get Platform ID Details
            $platformIdsData = $melisEngineTablePlatformIds->getEntryById($pids_id);
            $platformIdsData = $platformIdsData->current();

            $platformTable = $this->getServiceLocator()->get('MelisCoreTablePlatform');
            $platformData = $platformTable->getEntryById($pids_id);
            $platformData = $platformData->current();

            // Assign Platform name to Element Name of the Form from the App Tool
            $platformIdsData->pids_name_input = $platformData->plf_name;

            // Removing Select input
            $propertyForm->remove('pids_name_select');
            // Binding datas to the Form
            $propertyForm->bind($platformIdsData);

            // Set variable to View
            $view->pids_id = $pids_id;
            $view->tabTitle = 'tr_meliscms_tool_platform_ids_btn_edit';
        } else {
            // Removing Id input and Platform input
            $propertyForm->remove('pids_id');
            $propertyForm->remove('pids_name_input');
            // Set variable to View
            $view->tabTitle = 'tr_meliscms_tool_platform_ids_btn_add';
        }

        $view->setVariable('meliscms_tool_platform_generic_form', $propertyForm);
        $view->setVariable('available_platform', $availablePlatform);
        $view->melisKey = $this->params()->fromRoute('melisKey', '');

        return $view;
    }
public function renderPlatformModalContentAction ( ) { $ pids_id = $ this -> params ( ) -> fromQuery ( 'id' ) ; // Get Cms Platform ID form from  App Tool $ melisMelisCoreConfig = $ this -> serviceLocator -> get ( 'MelisCoreConfig' ) ; $ genericPlatformForm = $ melisMelisCoreConfig -> getFormMergedAndOrdered ( 'meliscms/tools/meliscms_platform_tool/forms/meliscms_tool_platform_generic_form' , 'meliscms_tool_platform_generic_form' ) ; // Factoring Calendar event and pass to view $ factory = new \ Zend \ Form \ Factory ( ) ; $ formElements = $ this -> serviceLocator -> get ( 'FormElementManager' ) ; $ factory -> setFormElementManager ( $ formElements ) ; $ propertyForm = $ factory -> createForm ( $ genericPlatformForm ) ; $ view = new ViewModel ( ) ; $ melisEngineTablePlatformIds = $ this -> getServiceLocator ( ) -> get ( 'MelisEngineTablePlatformIds' ) ; $ availablePlatform = $ melisEngineTablePlatformIds -> getAvailablePlatforms ( ) -> toArray ( ) ; // Check if Cms Platform Id is Set if ( ! empty ( $ pids_id ) ) { // Get Platform ID Details $ platformIdsData = $ melisEngineTablePlatformIds -> getEntryById ( $ pids_id ) ; $ platformIdsData = $ platformIdsData -> current ( ) ; $ platformTable = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreTablePlatform' ) ; $ platformData = $ platformTable -> getEntryById ( $ pids_id ) ; $ platformData = $ platformData -> current ( ) ; // Assign Platform name to Element Name of the Form from the App Tool $ platformIdsData -> pids_name_input = $ platformData -> plf_name ; // Removing Select input $ propertyForm -> remove ( 'pids_name_select' ) ; // Binding datas to the Form $ propertyForm -> bind ( $ platformIdsData ) ; // Set variable to View $ view -> pids_id = $ pids_id ; $ view -> tabTitle = 'tr_meliscms_tool_platform_ids_btn_edit' ; } else { // Removing Id input and Platform input $ propertyForm -> remove ( 'pids_id' ) ; $ propertyForm -> remove ( 'pids_name_input' ) ; // Set variable to View $ view -> tabTitle = 'tr_meliscms_tool_platform_ids_btn_add' ; } $ view -> setVariable ( 'meliscms_tool_platform_generic_form' , $ propertyForm ) ; $ view -> setVariable ( 'available_platform' , $ availablePlatform ) ; $ view -> melisKey = $ this -> params ( ) -> fromRoute ( 'melisKey' , '' ) ; return $ view ; }
Render Platform Content Modal
@return ViewModel
Render Platform Content Modal