Sets verification mode for the specified action.

@param string $actionName Action name.
@param bool $enable Enable (true) or disable (false) verification.

@return void
164529
public static function set($actionName = null, $enable) {
        $actionName = ($actionName === null ? '.' : $actionName);

        if ($actionName != '.' && !self::$actionContext->actionNameEquals($actionName)) {
            return;
        }

        self::$enable = $enable;
    }
206127
public function enable($name)
    {
        if ($this->isEnabled($name)) {
            return;
        }

        $extension = $this->getExtension($name);

        $this->dispatcher->dispatch(new Enabling($extension));

        $enabled = $this->getEnabled();

        $enabled[] = $name;

        $this->migrate($extension);

        $this->publishAssets($extension);

        $this->setEnabled($enabled);

        $extension->enable($this->app);

        $this->dispatcher->dispatch(new Enabled($extension));
    }
718982
public function setEnableImageMagick($enable)
    {
        if (!is_bool($enable)) {
            throw new \InvalidArgumentException(
                "enableImageMagick can only assume boolean values. Specified value: $enable.");
        }

        // Verify that the Imagick extension is installed
        if ($enable && !extension_loaded('imagick')) {
            throw new \Exception(
                'Failed to enable ImageMagick. '.
                'The Imagick PHP extension was not found on this system.');
        }
        
        $this->enableImageMagick = $enable;
    }
992898
function enable_strict_mode($mode = true)
    {
        if (self::MAYBE == $this->language_data['STRICT_MODE_APPLIES']) {
            $this->strict_mode = ($mode) ? self::ALWAYS : self::NEVER;
        }
    }
1237346
public function display($actionName, array $data = null)
    {
        return parent::display($actionName, array_merge($this->commonVars(), $data));
    }
206202
function enableAgent(name) {
        if (agents.hasOwnProperty(name) && !_enabledAgentNames.hasOwnProperty(name)) {
            _enabledAgentNames[name] = true;
        }
    }
534934
public function startAction($actionName)
    {
        $startStopwatch = $this->stopwatch && empty($this->actionStack);

        $this->actionStack[] = ['name' => $actionName, 'time' => microtime(true), 'subtrahend' => 0];
        $this->lastActionIndex++;
        if ($startStopwatch) {
            $this->stopwatch->start($this->getStopwatchName(), $this->sectionName);
        }
    }
1354564
protected function isActionAllowed($actionName)
    {
        switch ($actionName) {
            // autocomplete action is mapped to list action for access permissions
            case 'autocomplete':
            // embeddedList action is mapped to list action for access permissions
            case 'embeddedList':
                $actionName = 'list';
                break;
            // newAjax action is mapped to new action for access permissions
            case 'newAjax':
                $actionName = 'new';
                break;
            default:
                break;
        }

        // Get item for edit/show or custom actions => security voters may apply
        $easyadmin = $this->request->attributes->get('easyadmin');
        $subject = $easyadmin['item'] ?? null;
        $this->get(AdminAuthorizationChecker::class)->checksUserAccess($this->entity, $actionName, $subject);

        return parent::isActionAllowed($actionName);
    }
1224209
public function isAdminActionAllowed(ViewInterface $view, string $actionName)
    {
        $configuration = $view->getAdminConfiguration();

        return key_exists($actionName, $configuration->getParameter('actions'));
    }
156898
public static function setDuration($actionName, $value) {
        if (!self::canCache($actionName)) { return; }
        self::$settings[$actionName]['duration'] = $value;
    }
1356080
function setCurrentAction( $actionName, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        if ( $view == '' or $actionName == '' )
            return false;
        $this->ViewActions[$view] = $actionName;
    }
215260
public function setEnabled(bool $enabled = true): bool
    {
        $was = $this->enabled;
        $this->enabled = $enabled;

        return $was;
    }
1175454
private function activateMap($mapName)
    {
        if (!isset($this->activeMaps[$mapName]))
            $this->activeMaps[$mapName] = $this->maps[$mapName];
    }
1004511
private function translateActionName($actionName)
    {
        switch ($actionName) {
            case 'create':
                return Item::CREATE;
            case 'cut':
                return Item::CUT;
            case 'copy':
                return Item::COPY;
            case 'deepcopy':
                return Item::DEEP_COPY;
            default:
        }
        return null;
    }
193515
public function setInitializeOption(bool $enabled)
    {
        $this->initialized = $enabled ? (bool)$this->initialized : null;
    }
767073
public function enableOrDisable($name, $status)
    {
        $file = route()->com.$name.'/component.json';
        if (file_exists($file)) {
            $fileHandling = new FileHandling();
            $c = $fileHandling->open($file, 'readOnly')->read();
            $config = json_decode($c, true);
            $config['status'] = $status;
            $config = json_encode($config, JSON_PRETTY_PRINT);
            $fileHandling->open($file, 'writeOnly')->write($config);
            $fileHandling->close();

            return true;
        }

        return false;
    }
671364
private function addAction($actionName)
    {
        $template         = $this->templates[$actionName];
        $command          = preg_filter('/^/', '    ', explode(PHP_EOL, strtr($template, ['$actionName' => $actionName])));
        $command          = array_filter($command, function($var){return strlen(trim($var));});
        $command          = implode(PHP_EOL, $command);
        $this->commands[] = $command;
    }