method
public
TemplateCollection::getTemplate()
Сигнатура
public getTemplate(string $type) : Template|null
Параметры
$type
string
См. TemplateType
Возвращаемое значение
Template|null
Как применяется в TemplateCollection
TemplateCollection::getTemplate() — метод класса \Bitrix\Location\Entity\Format\TemplateCollection модуля «Местоположения».
Метод объекта: сначала нужен экземпляр TemplateCollection.
use Bitrix\Main\Loader;
use Bitrix\Location\Entity\Format\TemplateCollection;
Loader::includeModule('location');
/** @var TemplateCollection $object */
$type = '';
$result = $object->getTemplate($type);
// $result: Template|nullДругие методы TemplateCollection
addItem()Добавляет поле Format в коллекцию
getTemplate() есть и у других классов модуля «Местоположения»: Format, Template.
Исходный файл: source/location/lib/entity/format/templatecollection.php:49

