public function initToolbarTitle()
 {
     parent::initToolbarTitle();
     if ($product = $this->loadObject(true)) {
         if ((bool) $product->id && $this->display != 'list' && isset($this->toolbar_title[2])) {
             $this->toolbar_title[2] = $this->toolbar_title[2] . ' (' . $this->product_name . ')';
         }
     }
 }
 public function initToolbarTitle()
 {
     $this->toolbar_title = array_unique($this->breadcrumbs);
     parent::initToolbarTitle();
 }
 public function initToolbarTitle()
 {
     parent::initToolbarTitle();
     switch ($this->display) {
         case '':
         case 'list':
             array_pop($this->toolbar_title);
             $this->toolbar_title[] = $this->l('Manage your Customers');
             break;
         case 'view':
             /** @var Customer $customer */
             if (($customer = $this->loadObject(true)) && Validate::isLoadedObject($customer)) {
                 array_pop($this->toolbar_title);
             }
             $this->toolbar_title[] = sprintf('Information about Customer: %s', Tools::substr($customer->firstname, 0, 1) . '. ' . $customer->lastname);
             break;
         case 'add':
         case 'edit':
             array_pop($this->toolbar_title);
             /** @var Customer $customer */
             if (($customer = $this->loadObject(true)) && Validate::isLoadedObject($customer)) {
                 $this->toolbar_title[] = sprintf($this->l('Editing Customer: %s'), Tools::substr($customer->firstname, 0, 1) . '. ' . $customer->lastname);
             } else {
                 $this->toolbar_title[] = $this->l('Creating a new Customer');
             }
             break;
     }
     array_pop($this->meta_title);
     if (count($this->toolbar_title) > 0) {
         $this->addMetaTitle($this->toolbar_title[count($this->toolbar_title) - 1]);
     }
 }