public function editItemClass()
    {
        $this->defaultData();

        $clazz = $this->getClass($this->getRequestParameter('id'));

        if($this->hasRequestParameter('property_mode')){
            $this->setSessionAttribute('property_mode', $this->getRequestParameter('property_mode'));
        }

        $myForm = $this->getClassForm($clazz, $this->getClassService()->getRootClass());

        if ($this->hasWriteAccess($clazz->getUri())) {
            if($myForm->isSubmited()){
                if($myForm->isValid()){
                    if($clazz instanceof core_kernel_classes_Resource){
                        $this->setData("selectNode", tao_helpers_Uri::encode($clazz->getUri()));
                    }
                    $this->setData('message', __('Class schema saved'));
                    $this->setData('reload', false);
                }
            }
        } else {
            $myForm->setActions(array());
        }
        $this->setData('formTitle', __('Manage item class schema'));
        $this->setData('myForm', $myForm->render());
        $this->setView('form.tpl', 'tao');
    }
public function editItemClass()
    {
        $this->defaultData();

        $clazz = $this->getClass($this->getRequestParameter('id'));

        if($this->hasRequestParameter('property_mode')){
            $this->setSessionAttribute('property_mode', $this->getRequestParameter('property_mode'));
        }

        $myForm = $this->getClassForm($clazz, $this->getClassService()->getRootClass());

        if ($this->hasWriteAccess($clazz->getUri())) {
            if($myForm->isSubmited()){
                if($myForm->isValid()){
                    if($clazz instanceof core_kernel_classes_Resource){
                        $this->setData("selectNode", tao_helpers_Uri::encode($clazz->getUri()));
                    }
                    $this->setData('message', __('Class schema saved'));
                    $this->setData('reload', false);
                }
            }
        } else {
            $myForm->setActions(array());
        }
        $this->setData('formTitle', __('Manage item class schema'));
        $this->setData('myForm', $myForm->render());
        $this->setView('form.tpl', 'tao');
    }
public function editItemClass ( ) { $ this -> defaultData ( ) ; $ clazz = $ this -> getClass ( $ this -> getRequestParameter ( 'id' ) ) ; if ( $ this -> hasRequestParameter ( 'property_mode' ) ) { $ this -> setSessionAttribute ( 'property_mode' , $ this -> getRequestParameter ( 'property_mode' ) ) ; } $ myForm = $ this -> getClassForm ( $ clazz , $ this -> getClassService ( ) -> getRootClass ( ) ) ; if ( $ this -> hasWriteAccess ( $ clazz -> getUri ( ) ) ) { if ( $ myForm -> isSubmited ( ) ) { if ( $ myForm -> isValid ( ) ) { if ( $ clazz instanceof core_kernel_classes_Resource ) { $ this -> setData ( "selectNode" , tao_helpers_Uri :: encode ( $ clazz -> getUri ( ) ) ) ; } $ this -> setData ( 'message' , __ ( 'Class schema saved' ) ) ; $ this -> setData ( 'reload' , false ) ; } } } else { $ myForm -> setActions ( array ( ) ) ; } $ this -> setData ( 'formTitle' , __ ( 'Manage item class schema' ) ) ; $ this -> setData ( 'myForm' , $ myForm -> render ( ) ) ; $ this -> setView ( 'form.tpl' , 'tao' ) ; }
Edit a class
@requiresRight id READ
Edit a class