MetaModels\DcGeneral\Data\Driver::getLanguages PHP Метод

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

public getLanguages ( $mixID )
    public function getLanguages($mixID)
    {
        if (!$this->getMetaModel()->isTranslated()) {
            return null;
        }
        $collection = new DefaultLanguageInformationCollection();
        foreach ($this->getMetaModel()->getAvailableLanguages() as $langCode) {
            list($langCode, $country) = explode('_', $langCode, 2);
            $collection->add(new DefaultLanguageInformation($langCode, $country ?: null));
        }
        if (count($collection) > 0) {
            return $collection;
        }
        return null;
    }