src/Controller/PlatformSchemeController.php
public function toolContainerAction()
    {

        $form = $this->getForm();
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $view = new ViewModel();

        $view->melisKey = $this->getMelisKey();
        $view->hasAccess = $this->hasAccess($melisKey);

        $schemeData = $this->getPlatformSchemeSvc()->getCurrentScheme();

        if ($schemeData) {
            $colors = json_decode($schemeData->getColors(), true);
            if ($colors) {
                $form->setData($colors);
            }
        }

        $view->setVariable('form', $form);
        $view->schemes = $schemeData;

        return $view;
    }
public function toolContainerAction()
    {

        $form = $this->getForm();
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $view = new ViewModel();

        $view->melisKey = $this->getMelisKey();
        $view->hasAccess = $this->hasAccess($melisKey);

        $schemeData = $this->getPlatformSchemeSvc()->getCurrentScheme();

        if ($schemeData) {
            $colors = json_decode($schemeData->getColors(), true);
            if ($colors) {
                $form->setData($colors);
            }
        }

        $view->setVariable('form', $form);
        $view->schemes = $schemeData;

        return $view;
    }
public function toolContainerAction ( ) { $ form = $ this -> getForm ( ) ; $ melisKey = $ this -> params ( ) -> fromRoute ( 'melisKey' , '' ) ; $ view = new ViewModel ( ) ; $ view -> melisKey = $ this -> getMelisKey ( ) ; $ view -> hasAccess = $ this -> hasAccess ( $ melisKey ) ; $ schemeData = $ this -> getPlatformSchemeSvc ( ) -> getCurrentScheme ( ) ; if ( $ schemeData ) { $ colors = json_decode ( $ schemeData -> getColors ( ) , true ) ; if ( $ colors ) { $ form -> setData ( $ colors ) ; } } $ view -> setVariable ( 'form' , $ form ) ; $ view -> schemes = $ schemeData ; return $ view ; }
Tool display container
@return ViewModel
Tool display container