src/Charcoal/Admin/Widget/FormPropertyWidget.php
public function setType($type)
    {
        if (empty($type)) {
            $this->type = null;
            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Form property widget type must be a string'
            );
        }

        if ($this->propertyFactory()->isResolvable($type)) {
            $this->setPropertyType($type);
        }

        $this->type = $type;

        return $this;
    }
public function setType($type)
    {
        if (empty($type)) {
            $this->type = null;
            return $this;
        }

        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Form property widget type must be a string'
            );
        }

        if ($this->propertyFactory()->isResolvable($type)) {
            $this->setPropertyType($type);
        }

        $this->type = $type;

        return $this;
    }
public function setType ( $ type ) { if ( empty ( $ type ) ) { $ this -> type = null ; return $ this ; } if ( ! is_string ( $ type ) ) { throw new InvalidArgumentException ( 'Form property widget type must be a string' ) ; } if ( $ this -> propertyFactory ( ) -> isResolvable ( $ type ) ) { $ this -> setPropertyType ( $ type ) ; } $ this -> type = $ type ; return $ this ; }
Set the widget or property type.

@param  string $type The widget or property type.
@throws InvalidArgumentException If the argument is not a string.
@return FormPropertyWidget Chainable
Set the widget or property type .