protected function YaMaps::preparePlacemarkTitle in Yandex.Maps 8
Prepare placemark for the map.
Parameters
\Drupal\views\ResultRow $row: Row value.
Return value
string Prepared string.
1 call to YaMaps::preparePlacemarkTitle()
- YaMaps::overridePlacemarkTitle in src/
Plugin/ views/ style/ YaMaps.php - Override Placemark title.
File
- src/
Plugin/ views/ style/ YaMaps.php, line 682
Class
- YaMaps
- Allow to display several field items on a yandex map.
Namespace
Drupal\yamaps\Plugin\views\styleCode
protected function preparePlacemarkTitle(ResultRow $row) {
$title = '';
$placemark_title_field = $this->view->field[$this->options['placemark_title']];
if ($placemark_title_field != NULL) {
$placemark_title_field_entity = $placemark_title_field
->getEntity($row);
$placemark_title_field_values = $placemark_title_field_entity->{$placemark_title_field->definition['field_name']}
->getValue();
$title = !empty($placemark_title_field_values[0]['value']) ? $placemark_title_field_values[0]['value'] : '';
}
return Html::escape(strip_tags($title));
}