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

setAction() public method

Sets the action.
public setAction ( string $action )
$action string
    public function setAction($action)
    {
        $this->action = (string) $action;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * 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::setAction