Assign a new config, or clear existing, for the given identifier

@param string $identifier A specific identifier
@param HTMLEditorConfig $config Config to set, or null to clear
@return HTMLEditorConfig The assigned config
552903
public static function set_config($identifier, HTMLEditorConfig $config = null)
    {
        if ($config) {
            self::$configs[$identifier] = $config;
            self::$configs[$identifier]->setOption('editorIdentifier', $identifier);
        } else {
            unset(self::$configs[$identifier]);
        }
        return $config;
    }
1204816
public function htmlDivider($identifier, $content="", $tagName="div") {
		return $this->addHtmlComponent(new HtmlDivider($identifier, $content, $tagName));
	}
355366
protected function _configure(KObjectIdentifier $identifier, array $data = array())
    {
        //Prevent config settings from being stored in the identifier
        $config = clone $identifier->getConfig();

        //Append the config data from the singleton
        if($identifier->getType() != 'lib' && $this->isSingleton($identifier))
        {
            $parts = $identifier->toArray();

            unset($parts['type']);
            unset($parts['domain']);
            unset($parts['package']);

            //Append the config from the singleton
            $config->append($this->getIdentifier($parts)->getConfig());
        }

        //Append the config data for the object
        $config->append($data);

        //Set the service container and identifier
        $config->object_manager    = $this;
        $config->object_identifier = $identifier;

        return $config;
    }
1233455
public function findByIdentifier($identifier)
    {
        if (!isset($this->plugins[$identifier])) {
            $identifier = $this->normalizeIdentifier($identifier);
        }

        if (!isset($this->plugins[$identifier])) {
            return null;
        }

        return $this->plugins[$identifier];
    }
1057408
private function assertSingleClassProvider($identifier)
    {
        if (count($this->classProviders[$identifier]) > 1) {
            throw new ConfigurationException(
                sprintf(
                    "Expected only 1 class provider for '%s' but got %d:\n'%s' " .
                    "because of this the service can not be uniquely resolved",
                    $identifier,
                    count($this->classProviders[$identifier]),
                    implode(', ', $this->classProviders[$identifier])
                )
            );
        }
    }
592411
public static function getComponentWithIdentifier(string $identifier)
    {
        $components = self::getComponents();
        foreach ($components as $component) {
            if (empty($component->getIdentifier())) {
                continue;
            }
            
            if ($component->getIdentifier() == $identifier) {
                return $component;
            }
        }
        
        return null;
    }
1353419
public function registerLocator($identifier, array $config = array())
    {
        if(!$identifier instanceof ObjectLocatorInterface)
        {
            $locator = $this->getObject($identifier, $config);

            if(!$locator instanceof ObjectLocatorInterface)
            {
                throw new \UnexpectedValueException(
                    'Locator: '.get_class($locator).' does not implement ObjectLocatorInterface'
                );
            }
        }
        else $locator = $identifier;

        //Add the locator by name and type
        $this->_locators[$locator->getType()] = $locator;
        $this->_locators[$locator->getIdentifier()->getName()] = $locator;

        return $this;
    }
973895
public function set($identifier, $value)
    {
        $this->internalSet($this->configsContainer, $identifier, $value);

        return $this;
    }
1181079
public function setIdentifier(string $identifier) : self
    {
        // Sanitize Identifier => remove space and slashes
        $this->identifier = strtr(
            ucwords(strtr(
                $identifier,
                ['_' => ' ', '/' => '-', '.' => '_ ', '\\' => '_ ']
            )),
            [' ' => '']
        );

        return $this;
    }
6815
public function newContentTypeCreateStruct($identifier = null)
    {
        return $this->contentTypeService->newContentTypeCreateStruct(
            $identifier ?: $identifier = str_replace('.', '', uniqid('content_type_', true))
        );
    }
1101803
protected function instantiateConfig($config = null)
    {
        if (is_null($this->config) || ! is_null($config)) {
            $this->config = ! is_null($config)
                ? $config
                : new Config($this->helper);
        }

        return $this->config;
    }
780314
public function replace($identifier, $value)
    {
        $this->load();

        parent::replace($identifier, $value);
        $this->getDrupalCommonConnector()->variable_set($this->section, $this->registry[$this->section]);
    }
363830
protected function checkName(TinyMCEConfig $config)
    {
        $configs = HTMLEditorConfig::get_available_configs_map();
        foreach ($configs as $id => $name) {
            if (HTMLEditorConfig::get($id) === $config) {
                return $id;
            }
        }
        return 'custom';
    }
966779
public function bindSingletonRuleToClass ($identifier, $className)
		{
			$this->classIndex->setRuleToClass($identifier, $className);

			$this->rules[$identifier] = new SingletonClassBindingRule($this, $this->classIndex, $className);

			return $this;
		}
488848
public function normalizeIdentifier($identifier)
    {
        foreach ($this->plugins as $id => $object) {
            if (strtolower($id) == strtolower($identifier)) {
                return $id;
            }
        }

        return $identifier;
    }
795207
public function buildForm($identifier = null)
	{
		$this->setFormMapper(new FormMapper);
		$this->configureForm($this->getFormMapper());

		$this->setFormBuilder(new FormBuilder($this->getFormMapper()));
		$this->getFormBuilder()
			->setModel($this->getModel())
			->setIdentifier($identifier)
			->setContext($identifier === null ? FormBuilder::CONTEXT_CREATE : FormBuilder::CONTEXT_EDIT)
			->build();

		return $this;
	}
566304
public function init($identifier, $slug)
    {
        $this->getModel()->setId($identifier);
        $this->getModel()->setSlug($slug);

        $this->addMetabox();
    }