Sulu\Component\Content\Extension\ExtensionManager::hasExtension PHP Method

hasExtension() public method

public hasExtension ( $structureType, $name )
    public function hasExtension($structureType, $name)
    {
        $extensions = $this->getExtensions($structureType);
        return isset($extensions[$name]);
    }

Usage Example

Example #1
0
 /**
  * It can say if it has an extension.
  */
 public function testHasExtension()
 {
     $this->extensionManager->hasExtension('content', 'foo')->willReturn(true);
     $result = $this->structureManager->hasExtension('content', 'foo');
     $this->assertTrue($result);
 }