You are here

function views_handler_field_ym_title::init in Yandex.Metrics 7.2

Same name and namespace in other branches
  1. 8.2 yandex_metrics_reports/views/handlers/views_handler_field_ym_title.inc \views_handler_field_ym_title::init()
  2. 6.2 yandex_metrics_reports/views/handlers/views_handler_field_ym_title.inc \views_handler_field_ym_title::init()

Init the handler with necessary data.

Parameters

view $view: The $view object this handler is attached to.

array $options: The item from the database; the actual contents of this will vary based upon the type of handler.

Overrides views_handler_field::init

File

yandex_metrics_reports/views/handlers/views_handler_field_ym_title.inc, line 17
The 'page_title' field handler.

Class

views_handler_field_ym_title
Field handler allows linking page title to popular URL from Yandex.Metrica. Definition terms:

Code

function init(&$view, &$options) {
  parent::init($view, $options);

  // Don't add the additional fields to groupby.
  if (!empty($this->options['link_to_ym_url'])) {
    $this->additional_fields['url'] = array(
      'table' => 'yandex_metrics_reports_popular_content',
      'field' => 'url',
    );
  }
}