function RulesUiConfigHandler::getConfig

Gets the edited config object.

Return value

\Drupal\rules\Ui\RulesUiComponentProviderInterface|\Drupal\Core\Config\Config The component provider object (usually a config entity) or the editable config object.

3 calls to RulesUiConfigHandler::getConfig()
RulesUiConfigHandler::getComponent in src/Ui/RulesUiConfigHandler.php
Gets the currently edited component.
RulesUiConfigHandler::getComponentLabel in src/Ui/RulesUiConfigHandler.php
Gets the human-readable label of the component.
RulesUiConfigHandler::updateComponent in src/Ui/RulesUiConfigHandler.php
Updates the edited component.

File

src/Ui/RulesUiConfigHandler.php, line 80

Class

RulesUiConfigHandler
The default handler for RulesUi plugins that store to config.

Namespace

Drupal\rules\Ui

Code

public function getConfig() {
    $config = $this->fetchFromTempStore();
    if (!$config) {
        if (isset($this->pluginDefinition->settings['config_parameter'])) {
            $config = $this->currentRouteMatch
                ->getParameter($this->pluginDefinition->settings['config_parameter']);
        }
        else {
            $config = $this->configFactory
                ->getEditable($this->pluginDefinition->settings['config_name']);
        }
    }
    return $config;
}