public function hasType($nameOrType)
    {
        $name = $nameOrType instanceof WidgetTypeInterface ? $nameOrType->getName() : $nameOrType;

        return array_key_exists($name, $this->types);
    }
public function hasType($nameOrType)
    {
        $name = $nameOrType instanceof WidgetTypeInterface ? $nameOrType->getName() : $nameOrType;

        return array_key_exists($name, $this->types);
    }
public function hasType ( $ nameOrType ) { $ name = $ nameOrType instanceof WidgetTypeInterface ? $ nameOrType -> getName ( ) : $ nameOrType ; return array_key_exists ( $ name , $ this -> types ) ; }
Returns whether the widget type is registered or not.

@param $nameOrType
@return bool
Returns whether the widget type is registered or not .