Sulu\Component\Webspace\Manager\WebspaceManager::findPortalByKey PHP Method

findPortalByKey() public method

Returns the portal with the given key.
public findPortalByKey ( string $key ) : Portal
$key string The key to search for
return Sulu\Component\Webspace\Portal
    public function findPortalByKey($key)
    {
        return $this->getWebspaceCollection()->getPortal($key);
    }

Usage Example

コード例 #1
0
 public function testFindPortalByNotExistingKey()
 {
     $portal = $this->webspaceManager->findPortalByKey('not_existing');
     $this->assertNull($portal);
 }