configurator->tags[$this->tagName])) { return; } // Create tag $tag = $this->configurator->tags->add($this->tagName); // Create attribute $tag->attributes->add($this->attrName); // Create a template that replaces its content with the replacement char $tag->template = ''; } /** * Disable a given pass * * @param string $passName * @return void */ public function disablePass($passName) { $this->disabledPasses[] = $passName; } /** * Enable a given pass * * @param string $passName * @return void */ public function enablePass($passName) { foreach (array_keys($this->disabledPasses, $passName, true) as $k) { unset($this->disabledPasses[$k]); } } /** * {@inheritdoc} */ public function asConfig() { $config = [ 'attrName' => $this->attrName, 'tagName' => $this->tagName ]; foreach ($this->disabledPasses as $passName) { $config['disable' . $passName] = true; } return $config; } }