1 block.class.inc Block::getAdminTitle()

Return an administrative title that will always have a value.

File

core/modules/layout/includes/block.class.inc, line 133
A class that wraps around a block to store settings information.

Class

Block
@file A class that wraps around a block to store settings information.

Code

function getAdminTitle() {
  if (!empty($this->settings['admin_label'])) {
    return check_plain($this->settings['admin_label']);
  }

  $title = $this->getTitle();
  if (empty($title)) {
    // Last effort, use the title from hook_block_info().
    $info = $this->getBlockInfo();
    $title = check_plain($info['info']);
  }
  return $title;
}