protected function saveAdvProperty($propertyValues)
    {
        // might break using hard
        $range = array();
        foreach($propertyValues as $key => $value){
            if(is_array($value)){
                // set the range
                foreach($value as $v){
                    $range[] = $this->getClass(tao_helpers_Uri::decode($v));
                }
            }
            else{
                $values[tao_helpers_Uri::decode($key)] = tao_helpers_Uri::decode($value);
            }

        }
        //if label is empty
        $validator = new tao_helpers_form_validators_NotEmpty(array('message' => __('Property\'s label field is required')));
        if(!$validator->evaluate($values[OntologyRdfs::RDFS_LABEL])){
            throw new Exception($validator->getMessage());
        }

        $property = $this->getProperty($values['uri']);
        unset($values['uri']);
        $property->removePropertyValues($this->getProperty(OntologyRdfs::RDFS_RANGE));
        if(!empty($range)){
            foreach($range as $r){
                $property->setRange($r);
            }
        }
        $this->bindProperties($property, $values);
    }
protected function saveAdvProperty($propertyValues)
    {
        // might break using hard
        $range = array();
        foreach($propertyValues as $key => $value){
            if(is_array($value)){
                // set the range
                foreach($value as $v){
                    $range[] = $this->getClass(tao_helpers_Uri::decode($v));
                }
            }
            else{
                $values[tao_helpers_Uri::decode($key)] = tao_helpers_Uri::decode($value);
            }

        }
        //if label is empty
        $validator = new tao_helpers_form_validators_NotEmpty(array('message' => __('Property\'s label field is required')));
        if(!$validator->evaluate($values[OntologyRdfs::RDFS_LABEL])){
            throw new Exception($validator->getMessage());
        }

        $property = $this->getProperty($values['uri']);
        unset($values['uri']);
        $property->removePropertyValues($this->getProperty(OntologyRdfs::RDFS_RANGE));
        if(!empty($range)){
            foreach($range as $r){
                $property->setRange($r);
            }
        }
        $this->bindProperties($property, $values);
    }
protected function saveAdvProperty ( $ propertyValues ) { // might break using hard $ range = array ( ) ; foreach ( $ propertyValues as $ key => $ value ) { if ( is_array ( $ value ) ) { // set the range foreach ( $ value as $ v ) { $ range [ ] = $ this -> getClass ( tao_helpers_Uri :: decode ( $ v ) ) ; } } else { $ values [ tao_helpers_Uri :: decode ( $ key ) ] = tao_helpers_Uri :: decode ( $ value ) ; } } //if label is empty $ validator = new tao_helpers_form_validators_NotEmpty ( array ( 'message' => __ ( 'Property\'s label field is required' ) ) ) ; if ( ! $ validator -> evaluate ( $ values [ OntologyRdfs :: RDFS_LABEL ] ) ) { throw new Exception ( $ validator -> getMessage ( ) ) ; } $ property = $ this -> getProperty ( $ values [ 'uri' ] ) ; unset ( $ values [ 'uri' ] ) ; $ property -> removePropertyValues ( $ this -> getProperty ( OntologyRdfs :: RDFS_RANGE ) ) ; if ( ! empty ( $ range ) ) { foreach ( $ range as $ r ) { $ property -> setRange ( $ r ) ; } } $ this -> bindProperties ( $ property , $ values ) ; }
Advanced property handling

@param array $propertyValues
Advanced property handling