Sets the {@see IconGenerator} used to generate icons.

@param \Jdenticon\Rendering\IconGenerator $iconGenerator Icon generator
that will render the shapes of the identicon.
@return \Jdenticon\Identicon
340326
public function setIconGenerator(IconGenerator $iconGenerator)
    {
        if ($iconGenerator === null) {
            $iconGenerator = IconGenerator::getDefaultGenerator();
        }
        $this->iconGenerator = $iconGenerator;
        return $this;
    }
818265
public function render(IconSequence $icon)
    {
        $jsonBuilder = $this->getJsonBuilder()
            ->setValue('[icon]', $icon->getSymbol()->getVariable(), false)
            ->setValues($icon->getOptions());

        return $this->getFormatter()->renderObjectAssignment($icon, $jsonBuilder->build());
    }
498829
protected function materialDesignIconicFontIcon(MaterialDesignIconicFontIconInterface $icon) {

        $attributes = [];

        $attributes["class"][] = "zmdi";
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderName($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderSize($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderFixedWidth($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderBorder($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderPull($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderSpin($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderRotate($icon);
        $attributes["class"][] = MaterialDesignIconicFontIconRenderer::renderFlip($icon);
        $attributes["style"]   = MaterialDesignIconicFontIconRenderer::renderStyle($icon);

        return static::coreHTMLElement("i", null, $attributes);
    }
1046648
public static function create($generatorType)
    {
        switch ($generatorType) {
            case ClassMetadata::GENERATOR_TYPE_ASSIGNED:
                $instance = new AssignedIdGenerator();
                break;
            case ClassMetadata::GENERATOR_TYPE_REPOSITORY:
                $instance = new RepositoryIdGenerator();
                break;
            case ClassMetadata::GENERATOR_TYPE_PARENT:
                $instance = new ParentIdGenerator();
                break;
            case ClassMetadata::GENERATOR_TYPE_AUTO:
                $instance = new AutoIdGenerator();
                break;

            default:
                throw new InvalidArgumentException("ID Generator does not exist: $generatorType");
        }

        return $instance;
    }
1072272
public function setTwigGenerator(TwigGenerator $twigGenerator)
    {
        $this->twigGenerator = $twigGenerator;
        $this->twigGenerator->setTemplateDirs(array(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Templates'));
        $this->twigGenerator->setMustOverwriteIfExists(true);
    }
438244
public function setIcon( $icon = null ) {
		if ( $this->iconName !== null ) {
			$this->icon->removeClasses( [ 'oo-ui-icon-' . $this->iconName ] );
		}
		if ( $icon !== null ) {
			$this->icon->addClasses( [ 'oo-ui-icon-' . $icon ] );
		}

		$this->iconName = $icon;
		$this->toggleClasses( [ 'oo-ui-iconElement' ], (bool)$this->iconName );
		$this->icon->toggleClasses( [ 'oo-ui-iconElement-noIcon' ], !$this->iconName );

		return $this;
	}
910341
public function getGenerator()
    {
        parent::getGenerator();

        $this->generator->setOptionProperty(
            Option::COURSE_NAVIGATION(),
            'visibility',
            'admins'
        );
        $this->generator->setOptionProperty(
            Option::ACCOUNT_NAVIGATION(),
            'visibility',
            'admins'
        );

        return $this->generator;
    }
381059
@SuppressWarnings( "UnusedDeclaration" )
    public void addGenerator( ObjectIdGenerator<?> generator ) {
        if ( null == generators ) {
            generators = new ArrayList<ObjectIdGenerator<?>>();
        }
        generators.add( generator );
    }
447808
protected function createIcon($iconName)
	{
		if (is_callable($this->createIconCallback)) {
			return call_user_func($this->createIconCallback, $iconName);
		} else {
			return Icon::create($iconName);
		}
	}
333453
public static function icon($identifier, $icon) {
		$result=new HtmlButton($identifier);
		$result->asIcon($icon);
		return $result;
	}
1269644
public void setIdGenerators(Set<String> idGenerators) {
    RenamingMap gen = new UniqueRenamingToken();
    ImmutableMap.Builder<String, RenamingMap> builder = ImmutableMap.builder();
    for (String name : idGenerators) {
       builder.put(name, gen);
    }
    this.idGenerators = builder.build();
  }
393775
public function generate(ReflectionClass $originalClass, ClassGenerator $classGenerator)
    {
        CanProxyAssertion::assertClassCanBeProxied($originalClass);

        $interfaces = [RemoteObjectInterface::class];

        if ($originalClass->isInterface()) {
            $interfaces[] = $originalClass->getName();
        } else {
            $classGenerator->setExtendedClass($originalClass->getName());
        }

        $classGenerator->setImplementedInterfaces($interfaces);
        $classGenerator->addPropertyFromGenerator($adapter = new AdapterProperty());

        array_map(
            static function (MethodGenerator $generatedMethod) use ($originalClass, $classGenerator) : void {
                ClassGeneratorUtils::addMethodIfNotFinal($originalClass, $classGenerator, $generatedMethod);
            },
            array_merge(
                array_map(
                    static function (ReflectionMethod $method) use ($adapter, $originalClass) : RemoteObjectMethod {
                        return RemoteObjectMethod::generateMethod(
                            new MethodReflection($method->getDeclaringClass()->getName(), $method->getName()),
                            $adapter,
                            $originalClass
                        );
                    },
                    ProxiedMethodsFilter::getProxiedMethods(
                        $originalClass,
                        ['__get', '__set', '__isset', '__unset']
                    )
                ),
                [
                    new StaticProxyConstructor($originalClass, $adapter),
                    new MagicGet($originalClass, $adapter),
                    new MagicSet($originalClass, $adapter),
                    new MagicIsset($originalClass, $adapter),
                    new MagicUnset($originalClass, $adapter),
                ]
            )
        );
    }
998417
protected function generateSetterProxy(AbstractGenerator $proxyGenerator)
    {
        $methodName = 'set'.StringUtil::camelize($this->propertyName);
        if (!$proxyGenerator->getReflection()->hasMethod($methodName)) {
            $proxyGenerator->addError(
                sprintf(
                    'Document class %s does not contain method %s, therefore it had not been generated in proxy.',
                    $proxyGenerator->getDocumentClass(),
                    $methodName
                )
            );

            return;
        }

        $methodReflection = $proxyGenerator->getReflection()->getMethod($methodName);
        if (1 !== count($methodReflection->getParameters())) {
            $proxyGenerator->addError(
                sprintf(
                    'Method %s::%s() must have 1 argument, but has %d arguments, therefore it had not been generated in proxy.',
                    $proxyGenerator->getDocumentClass(),
                    $methodName,
                    count($methodReflection->getParameters())
                )
            );

            return;
        }

        $method = MethodGenerator::fromReflection($methodReflection);
        $paramName = current($method->getParameters())->getName();

        $code = <<<'EOT'
parent::{{methodName}}(${{paramName}});
%s
$this->getRootProxy()->set($this->getPathInDocument('{{dbFieldName}}'), $dbValue);

return $this;
EOT;
        $paramToDbValueConversionCode = strtr(
            $this->getSerializationCode(),
            [
                '$dbData' => '$dbValue',
                '$objectData' => '$'.$paramName,
            ]
        );
        $code = sprintf($code, $paramToDbValueConversionCode);
        $code = self::compileCode($code, [
            'methodName' => $methodName,
            'paramName' => $paramName,
            'dbFieldName' => $this->dbFieldName,
        ]);

        $method->setBody($code);

        $proxyGenerator->addMethod($method);
    }
566424
public function getIdGenerator(int $generatorType): GeneratorInterface
    {
        static $generators = [];
        if (isset($generators[$generatorType])) {
            return $generators[$generatorType];
        }

        switch ($generatorType) {
            case DocumentMetadata::GENERATOR_TYPE_NONE:
                $generator = new AssignedIdGenerator();
                break;

            case DocumentMetadata::GENERATOR_TYPE_AUTO:
                $generator = new IdentityGenerator();
                break;

            default:
                throw new \InvalidArgumentException('Unknown id generator type '.$generatorType);
        }

        return $generators[$generatorType] = $generator;
    }
342369
private function processClassGenerator(ContainerBuilder $container)
    {
        $definition = new Definition('Drupal\DrupalExtension\Context\ContextClass\ClassGenerator');
        $container->setDefinition(ContextExtension::CLASS_GENERATOR_TAG . '.simple', $definition);
    }
292159
protected function setGeneratorImages()
    {
        $this->logger->debug('Base:setGeneratorImages');
        $this->setParam('generator', 'images');
        $this->setParam('gimlimit', $this->getLimit());
    }
1202968
public function addLinkGeneratorItem(\Tecnocreaciones\Bundle\ToolsBundle\Model\LinkGenerator\LinkGeneratorItemInterface $linkGeneratorItem) {
        $linkGeneratorItem->setLinkGeneratorService($this);
        $this->linkGeneratorItems[] = $linkGeneratorItem;
        return $this;
    }