ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
HTMLPurifier_Injector_DisplayLinkURI Class Reference

Injector that displays the URL of an anchor instead of linking to it, in addition to showing the text of the link. More...

+ Inheritance diagram for HTMLPurifier_Injector_DisplayLinkURI:
+ Collaboration diagram for HTMLPurifier_Injector_DisplayLinkURI:

Public Member Functions

 handleElement (&$token)
 
 handleEnd (&$token)
 
- Public Member Functions inherited from HTMLPurifier_Injector
 rewindOffset ($offset)
 Rewind to a spot to re-perform processing. More...
 
 getRewindOffset ()
 Retrieves rewind offset, and then unsets it. More...
 
 prepare ($config, $context)
 Prepares the injector by giving it the config and context objects: this allows references to important variables to be made within the injector. More...
 
 checkNeeded ($config)
 This function checks if the HTML environment will work with the Injector: if p tags are not allowed, the Auto-Paragraphing injector should not be enabled. More...
 
 allowsElement ($name)
 Tests if the context node allows a certain element. More...
 
 handleText (&$token)
 Handler that is called when a text token is processed. More...
 
 handleElement (&$token)
 Handler that is called when a start or empty token is processed. More...
 
 handleEnd (&$token)
 Handler that is called when an end token is processed. More...
 
 notifyEnd ($token)
 Notifier that is called when an end token is processed. More...
 

Data Fields

 $name = 'DisplayLinkURI'
 string More...
 
 $needed = array('a')
 array More...
 
- Data Fields inherited from HTMLPurifier_Injector
 $name
 Advisory name of injector, this is for friendly error messages. More...
 
 $needed = array()
 Array of elements and attributes this injector creates and therefore need to be allowed by the definition. More...
 

Additional Inherited Members

- Protected Member Functions inherited from HTMLPurifier_Injector
 forward (&$i, &$current)
 Iterator function, which starts with the next token and continues until you reach the end of the input tokens. More...
 
 forwardUntilEndToken (&$i, &$current, &$nesting)
 Similar to _forward, but accepts a third parameter $nesting (which should be initialized at 0) and stops when we hit the end tag for the node $this->inputIndex starts in. More...
 
 backward (&$i, &$current)
 Iterator function, starts with the previous token and continues until you reach the beginning of input tokens. More...
 
- Protected Attributes inherited from HTMLPurifier_Injector
 $htmlDefinition
 HTMLPurifier_HTMLDefinition More...
 
 $currentNesting
 Reference to CurrentNesting variable in Context. More...
 
 $currentToken
 Reference to current token. More...
 
 $inputZipper
 Reference to InputZipper variable in Context. More...
 
 $rewindOffset = false
 Number of elements to rewind backwards (relative). More...
 

Detailed Description

Injector that displays the URL of an anchor instead of linking to it, in addition to showing the text of the link.

Definition at line 6 of file DisplayLinkURI.php.

Member Function Documentation

◆ handleElement()

HTMLPurifier_Injector_DisplayLinkURI::handleElement ( $token)
Parameters
$token

Definition at line 21 of file DisplayLinkURI.php.

22  {
23  }

◆ handleEnd()

HTMLPurifier_Injector_DisplayLinkURI::handleEnd ( $token)
Parameters
HTMLPurifier_Token$token

Definition at line 28 of file DisplayLinkURI.php.

References $url.

29  {
30  if (isset($token->start->attr['href'])) {
31  $url = $token->start->attr['href'];
32  unset($token->start->attr['href']);
33  $token = array($token, new HTMLPurifier_Token_Text(" ($url)"));
34  } else {
35  // nothing to display
36  }
37  }
$url
Definition: shib_logout.php:72
Concrete text token class.
Definition: Text.php:12

Field Documentation

◆ $name

HTMLPurifier_Injector_DisplayLinkURI::$name = 'DisplayLinkURI'

string

Definition at line 11 of file DisplayLinkURI.php.

◆ $needed

HTMLPurifier_Injector_DisplayLinkURI::$needed = array('a')

array

Definition at line 16 of file DisplayLinkURI.php.


The documentation for this class was generated from the following file: