Created
July 11, 2012 18:21
-
-
Save jec006/3092153 to your computer and use it in GitHub Desktop.
RootCondit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Helper method for getting and causing the root Condition | |
* | |
* The Root condition is the use as the basis for the constructing the preview form | |
* It can be expect that it will be much more complicated then the other conditions | |
* | |
* This method select the condition and its config using the config controller. | |
* | |
* @return \Drupal\sps\Plugins\ConditionInterface | |
* the current root condition object | |
*/ | |
protected function getRootCondition() { | |
if(!isset($this->root_condition)) { | |
$settings = $this->config_controller->get(SPS_CONFIG_ROOT_CONDITION); | |
$root_condition_plugin = $settings['name']; | |
$this->root_condition = $this->getPlugin('condition', $root_condition_plugin); | |
//$this->root_condition->setConfig($settings['config']); | |
} | |
return $this->root_condition; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment