public function view::get_title in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 includes/view.inc \view::get_title()
- 6.2 includes/view.inc \view::get_title()
Get the view's current title.
This can change depending upon how it was built.
File
- includes/
view.inc, line 1562 - views_objects Objects that represent a View or part of a view
Class
- view
- An object to contain all of the data to generate a view.
Code
public function get_title() {
if (empty($this->display_handler)) {
if (!$this
->set_display('default')) {
return FALSE;
}
}
// During building, we might find a title override. If so, use it.
if (!empty($this->build_info['title'])) {
$title = $this->build_info['title'];
}
else {
$title = $this->display_handler
->get_option('title');
}
// Allow substitutions from the first row.
if ($this
->init_style()) {
$title = $this->style_plugin
->tokenize_value($title, 0);
}
return $title;
}