public function setContentClass()
    {
        $delivery = $this->getCurrentInstance();
        $contentClass = $this->getClass($this->getRequestParameter('model'));

        if (is_null($this->getClassService()->getContent($delivery))) {
            $content = $this->getClassService()->createContent($delivery, $contentClass);
            $success = true;
        } else {
            $this->logWarning('Content already defined, cannot be replaced');
            $success = false;
        }
        $this->returnJson(array(
            'success' => $success
        ));
    }
public function setContentClass()
    {
        $delivery = $this->getCurrentInstance();
        $contentClass = $this->getClass($this->getRequestParameter('model'));

        if (is_null($this->getClassService()->getContent($delivery))) {
            $content = $this->getClassService()->createContent($delivery, $contentClass);
            $success = true;
        } else {
            $this->logWarning('Content already defined, cannot be replaced');
            $success = false;
        }
        $this->returnJson(array(
            'success' => $success
        ));
    }
public function setContentClass ( ) { $ delivery = $ this -> getCurrentInstance ( ) ; $ contentClass = $ this -> getClass ( $ this -> getRequestParameter ( 'model' ) ) ; if ( is_null ( $ this -> getClassService ( ) -> getContent ( $ delivery ) ) ) { $ content = $ this -> getClassService ( ) -> createContent ( $ delivery , $ contentClass ) ; $ success = true ; } else { $ this -> logWarning ( 'Content already defined, cannot be replaced' ) ; $ success = false ; } $ this -> returnJson ( array ( 'success' => $ success ) ) ; }
Set the model to use for the delivery
Set the model to use for the delivery