eZ\Publish\Core\REST\Client\Values\ContentType\ContentType::getDescription PHP Method

getDescription() public method

This method returns the name of the content type in the given language.
public getDescription ( string $languageCode ) : string
$languageCode string
return string the description for the given language or null if none exists.
    public function getDescription($languageCode)
    {
        return $this->descriptions[$languageCode];
    }

Usage Example

 public function testGetDescription()
 {
     $contentType = new ContentType($this->contentTypeServiceMock, array('descriptions' => array('eng-US' => 'Sindelfingen', 'eng-GB' => 'Bielefeld')));
     $this->assertEquals('Sindelfingen', $contentType->getDescription('eng-US'));
     $this->assertEquals('Bielefeld', $contentType->getDescription('eng-GB'));
 }