Contao\CoreBundle\Monolog\ContaoContext::getAction PHP Method

getAction() public method

Returns the action.
public getAction ( ) : string | null
return string | null
    public function getAction()
    {
        return $this->action;
    }

Usage Example

 /**
  * Sets the action.
  *
  * @param ContaoContext $context
  * @param int           $level
  */
 private function updateAction(ContaoContext $context, $level)
 {
     if (null !== $context->getAction()) {
         return;
     }
     if ($level >= Logger::ERROR) {
         $context->setAction(ContaoContext::ERROR);
     } else {
         $context->setAction(ContaoContext::GENERAL);
     }
 }
All Usage Examples Of Contao\CoreBundle\Monolog\ContaoContext::getAction