HeadingPermalinkProcessor
in package
implements
ConfigurationAwareInterface
Searches the Document for Heading elements and adds HeadingPermalinks to each one
Interfaces, Classes and Traits
- ConfigurationAwareInterface
- Implement this class to inject the configuration where needed
Table of Contents
- INSERT_AFTER = 'after'
- INSERT_BEFORE = 'before'
- $config : ConfigurationInterface
- $slugNormalizer : TextNormalizerInterface|SlugGeneratorInterface
- __construct() : mixed
- __invoke() : void
- setConfiguration() : void
- addHeadingLink() : void
- ensureUnique() : string
- getChildText() : string
- useNormalizerFromConfigurationIfProvided() : void
Constants
INSERT_AFTER
public
mixed
INSERT_AFTER
= 'after'
INSERT_BEFORE
public
mixed
INSERT_BEFORE
= 'before'
Properties
$config
private
ConfigurationInterface
$config
$slugNormalizer
private
TextNormalizerInterface|SlugGeneratorInterface
$slugNormalizer
Methods
__construct()
public
__construct([TextNormalizerInterface|SlugGeneratorInterface|null $slugNormalizer = null ]) : mixed
Parameters
- $slugNormalizer : TextNormalizerInterface|SlugGeneratorInterface|null = null
Return values
mixed —__invoke()
public
__invoke(DocumentParsedEvent $e) : void
Parameters
- $e : DocumentParsedEvent
Return values
void —setConfiguration()
public
setConfiguration(ConfigurationInterface $configuration) : void
Parameters
- $configuration : ConfigurationInterface
Return values
void —addHeadingLink()
private
addHeadingLink(Heading $heading, Document $document) : void
Parameters
Return values
void —ensureUnique()
private
ensureUnique(string $proposed, Document $document) : string
Parameters
- $proposed : string
- $document : Document
Return values
string —getChildText()
private
getChildText(Node $node) : string
Parameters
- $node : Node
Tags
Return values
string —useNormalizerFromConfigurationIfProvided()
private
useNormalizerFromConfigurationIfProvided() : void