original_string: protected function _getPageTitle()
      {
          $action = $this->_action();
  
          $title = $action->getConfig('scaffold.page_title');
          if (!empty($title)) {
              return $title;
          }
  
          $scope = $action->getConfig('scope');
  
          $request = $this->_request();
          $actionName = Inflector::humanize(Inflector::underscore($request->getParam('action')));
          $controllerName = $this->_controllerName();
  
          if ($scope === 'table') {
              if ($actionName === 'Index') {
                  return $controllerName;
              }
  
              return sprintf('%s %s', $controllerName, $actionName);
          }
  
          $primaryKeyValue = $this->_primaryKeyValue();
          if ($primaryKeyValue === null) {
              return sprintf('%s %s', $actionName, $controllerName);
          }
  
          $displayFieldValue = $this->_displayFieldValue();
          if ($displayFieldValue === null || $this->_table()->getDisplayField() == $this->_table()->getPrimaryKey()) {
              return sprintf('%s %s #%s', $actionName, $controllerName, $primaryKeyValue);
          }
  
          return sprintf('%s %s #%s: %s', $actionName, $controllerName, $primaryKeyValue, $displayFieldValue);
      }
code: protected function _getPageTitle()
      {
          $action = $this->_action();
  
          $title = $action->getConfig('scaffold.page_title');
          if (!empty($title)) {
              return $title;
          }
  
          $scope = $action->getConfig('scope');
  
          $request = $this->_request();
          $actionName = Inflector::humanize(Inflector::underscore($request->getParam('action')));
          $controllerName = $this->_controllerName();
  
          if ($scope === 'table') {
              if ($actionName === 'Index') {
                  return $controllerName;
              }
  
              return sprintf('%s %s', $controllerName, $actionName);
          }
  
          $primaryKeyValue = $this->_primaryKeyValue();
          if ($primaryKeyValue === null) {
              return sprintf('%s %s', $actionName, $controllerName);
          }
  
          $displayFieldValue = $this->_displayFieldValue();
          if ($displayFieldValue === null || $this->_table()->getDisplayField() == $this->_table()->getPrimaryKey()) {
              return sprintf('%s %s #%s', $actionName, $controllerName, $primaryKeyValue);
          }
  
          return sprintf('%s %s #%s: %s', $actionName, $controllerName, $primaryKeyValue, $displayFieldValue);
      }
code_tokens: protected function _getPageTitle ( ) { $ action = $ this -> _action ( ) ; $ title = $ action -> getConfig ( 'scaffold.page_title' ) ; if ( ! empty ( $ title ) ) { return $ title ; } $ scope = $ action -> getConfig ( 'scope' ) ; $ request = $ this -> _request ( ) ; $ actionName = Inflector :: humanize ( Inflector :: underscore ( $ request -> getParam ( 'action' ) ) ) ; $ controllerName = $ this -> _controllerName ( ) ; if ( $ scope === 'table' ) { if ( $ actionName === 'Index' ) { return $ controllerName ; } return sprintf ( '%s %s' , $ controllerName , $ actionName ) ; } $ primaryKeyValue = $ this -> _primaryKeyValue ( ) ; if ( $ primaryKeyValue === null ) { return sprintf ( '%s %s' , $ actionName , $ controllerName ) ; } $ displayFieldValue = $ this -> _displayFieldValue ( ) ; if ( $ displayFieldValue === null || $ this -> _table ( ) -> getDisplayField ( ) == $ this -> _table ( ) -> getPrimaryKey ( ) ) { return sprintf ( '%s %s #%s' , $ actionName , $ controllerName , $ primaryKeyValue ) ; } return sprintf ( '%s %s #%s: %s' , $ actionName , $ controllerName , $ primaryKeyValue , $ displayFieldValue ) ; }
docstring: Returns the sites title to show on scaffolded view
  
  @return string
docstring_tokens: Returns the sites title to show on scaffolded view