src/Traits/ViewVarTrait.php
protected function _deriveViewVar()
    {
        if ($this->scope() === 'table') {
            return Inflector::variable($this->_controller()->getName());
        }

        if ($this->scope() === 'entity') {
            return Inflector::variable(Inflector::singularize($this->_controller()->getName()));
        }

        throw new Exception('Unknown action scope: ' . $this->scope());
    }
protected function _deriveViewVar()
    {
        if ($this->scope() === 'table') {
            return Inflector::variable($this->_controller()->getName());
        }

        if ($this->scope() === 'entity') {
            return Inflector::variable(Inflector::singularize($this->_controller()->getName()));
        }

        throw new Exception('Unknown action scope: ' . $this->scope());
    }
protected function _deriveViewVar ( ) { if ( $ this -> scope ( ) === 'table' ) { return Inflector :: variable ( $ this -> _controller ( ) -> getName ( ) ) ; } if ( $ this -> scope ( ) === 'entity' ) { return Inflector :: variable ( Inflector :: singularize ( $ this -> _controller ( ) -> getName ( ) ) ) ; } throw new Exception ( 'Unknown action scope: ' . $ this -> scope ( ) ) ; }
Derive the viewVar based on the scope of the action

Actions working on a single entity will use singular name,
and actions working on a full table will use plural name

@throws Exception
@return string
Derive the viewVar based on the scope of the action