Symfony\Component\Form\FormFactory::hasType PHP Метод

hasType() публичный Метод

Returns whether the given type is supported.
Устаревший: Deprecated since version 2.1, to be removed in 2.3. Use {@link FormRegistryInterface::hasType()} instead.
public hasType ( string $name ) : boolean
$name string The name of the type
Результат boolean Whether the type is supported
    public function hasType($name)
    {
        return $this->registry->hasType($name);
    }

Usage Example

Пример #1
0
 public function testHasType()
 {
     $this->registry->expects($this->once())->method('hasType')->with('name')->will($this->returnValue('RESULT'));
     set_error_handler(array('Symfony\\Component\\Form\\Test\\DeprecationErrorHandler', 'handle'));
     $this->assertSame('RESULT', $this->factory->hasType('name'));
     restore_error_handler();
 }
All Usage Examples Of Symfony\Component\Form\FormFactory::hasType