src/Charcoal/Admin/Widget/FormPropertyWidget.php
private function createProperty()
    {
        $propType = $this->propertyType();
        if (empty($propType)) {
            $ident = $this->propertyIdent();
            if ($ident && is_string($ident)) {
                $message = sprintf('Missing property type for property "%s"', $ident);
            } else {
                $message = sprintf('Missing property type');
            }
            throw new UnexpectedValueException($message);
        }

        $prop = $this->propertyFactory()->create($propType);

        $prop->setIdent($this->propertyIdent());
        $prop->setData($this->propertyData());

        return $prop;
    }
private function createProperty()
    {
        $propType = $this->propertyType();
        if (empty($propType)) {
            $ident = $this->propertyIdent();
            if ($ident && is_string($ident)) {
                $message = sprintf('Missing property type for property "%s"', $ident);
            } else {
                $message = sprintf('Missing property type');
            }
            throw new UnexpectedValueException($message);
        }

        $prop = $this->propertyFactory()->create($propType);

        $prop->setIdent($this->propertyIdent());
        $prop->setData($this->propertyData());

        return $prop;
    }
private function createProperty ( ) { $ propType = $ this -> propertyType ( ) ; if ( empty ( $ propType ) ) { $ ident = $ this -> propertyIdent ( ) ; if ( $ ident && is_string ( $ ident ) ) { $ message = sprintf ( 'Missing property type for property "%s"' , $ ident ) ; } else { $ message = sprintf ( 'Missing property type' ) ; } throw new UnexpectedValueException ( $ message ) ; } $ prop = $ this -> propertyFactory ( ) -> create ( $ propType ) ; $ prop -> setIdent ( $ this -> propertyIdent ( ) ) ; $ prop -> setData ( $ this -> propertyData ( ) ) ; return $ prop ; }
Create the widget's model property from the property's dataset.

@throws UnexpectedValueException If the property type is missing.
@return PropertyInterface
Create the widget s model property from the property s dataset .