src/Contao/View/Contao2BackendView/Controller/ClipboardController.php
public function handleAction(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        if ('clear-clipboard' === ($actionName = $event->getAction()->getName())) {
            $this->clearClipboard($event);
        }

        if (false === $this->checkPermission($event)) {
            $this->clearClipboard($event, false);

            $event->stopPropagation();

            return;
        }

        if ('create' === $actionName
            || 'cut' === $actionName
            || 'copy' === $actionName
            || 'deepcopy' === $actionName
        ) {
            $this->addToClipboard($event);
        }
    }
public function handleAction(ActionEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        if ('clear-clipboard' === ($actionName = $event->getAction()->getName())) {
            $this->clearClipboard($event);
        }

        if (false === $this->checkPermission($event)) {
            $this->clearClipboard($event, false);

            $event->stopPropagation();

            return;
        }

        if ('create' === $actionName
            || 'cut' === $actionName
            || 'copy' === $actionName
            || 'deepcopy' === $actionName
        ) {
            $this->addToClipboard($event);
        }
    }
public function handleAction ( ActionEvent $ event ) { if ( ! $ this -> scopeDeterminator -> currentScopeIsBackend ( ) ) { return ; } if ( 'clear-clipboard' === ( $ actionName = $ event -> getAction ( ) -> getName ( ) ) ) { $ this -> clearClipboard ( $ event ) ; } if ( false === $ this -> checkPermission ( $ event ) ) { $ this -> clearClipboard ( $ event , false ) ; $ event -> stopPropagation ( ) ; return ; } if ( 'create' === $ actionName || 'cut' === $ actionName || 'copy' === $ actionName || 'deepcopy' === $ actionName ) { $ this -> addToClipboard ( $ event ) ; } }
Handle action.

@param ActionEvent $event The action event.

@return void
Handle action .