protected function defaultData()
    {
        parent::defaultData();
        if($this->hasRequestParameter('uri')){
            $uri = $this->getRequestParameter('uri');
            $classUri = $this->getRequestParameter('classUri');
            if(!empty($uri)){
                $item = $this->getResource(tao_helpers_Uri::decode($uri));
                $this->setData('label', $item->getLabel());
                $this->setData('authoringUrl', _url('authoring', 'Items', 'taoItems', array('uri' => $uri, 'classUri' => $classUri)));
                $this->setData('previewUrl', $this->getClassService()->getPreviewUrl($item));
            }
        }
    }
protected function defaultData()
    {
        parent::defaultData();
        if($this->hasRequestParameter('uri')){
            $uri = $this->getRequestParameter('uri');
            $classUri = $this->getRequestParameter('classUri');
            if(!empty($uri)){
                $item = $this->getResource(tao_helpers_Uri::decode($uri));
                $this->setData('label', $item->getLabel());
                $this->setData('authoringUrl', _url('authoring', 'Items', 'taoItems', array('uri' => $uri, 'classUri' => $classUri)));
                $this->setData('previewUrl', $this->getClassService()->getPreviewUrl($item));
            }
        }
    }
protected function defaultData ( ) { parent :: defaultData ( ) ; if ( $ this -> hasRequestParameter ( 'uri' ) ) { $ uri = $ this -> getRequestParameter ( 'uri' ) ; $ classUri = $ this -> getRequestParameter ( 'classUri' ) ; if ( ! empty ( $ uri ) ) { $ item = $ this -> getResource ( tao_helpers_Uri :: decode ( $ uri ) ) ; $ this -> setData ( 'label' , $ item -> getLabel ( ) ) ; $ this -> setData ( 'authoringUrl' , _url ( 'authoring' , 'Items' , 'taoItems' , array ( 'uri' => $ uri , 'classUri' => $ classUri ) ) ) ; $ this -> setData ( 'previewUrl' , $ this -> getClassService ( ) -> getPreviewUrl ( $ item ) ) ; } } }
overwrite the parent defaultData, adding the item label to be sent to the view
overwrite the parent defaultData adding the item label to be sent to the view