ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Data\Text\Shape\SimpleDocumentMarkdown Class Reference
+ Inheritance diagram for ILIAS\Data\Text\Shape\SimpleDocumentMarkdown:
+ Collaboration diagram for ILIAS\Data\Text\Shape\SimpleDocumentMarkdown:

Public Member Functions

 getSupportedStructure ()
 
 fromString (string $text)
 
 isRawStringCompliant (string $text)
 
- Public Member Functions inherited from ILIAS\Data\Text\Markdown
 __construct (MarkdownShape $markdown_shape, string $raw)
 
- Public Member Functions inherited from ILIAS\Data\Text\TextBase
 __construct (protected Shape $shape, protected string $raw)
 
 getShape ()
 
 getMarkup ()
 
 getSupportedStructure ()
 
 toHTML ()
 
 toPlainText ()
 
 getRawRepresentation ()
 
 getShape ()
 
 getMarkup ()
 
 getSupportedStructure ()
 
 toHTML ()
 
 toPlainText ()
 
 getRawRepresentation ()
 

Detailed Description

Definition at line 27 of file SimpleDocumentMarkdown.php.

Member Function Documentation

◆ fromString()

ILIAS\Data\Text\Shape\SimpleDocumentMarkdown::fromString ( string  $text)

Reimplemented in ILIAS\Data\Text\Shape\WordOnlyMarkdown.

Definition at line 52 of file SimpleDocumentMarkdown.php.

52 : Text\SimpleDocumentMarkdown
53 {
54 return new Text\SimpleDocumentMarkdown($this, $text);
55 }

Referenced by ILIAS\Data\Text\MarkdownFactory\simpleDocument().

+ Here is the caller graph for this function:

◆ getSupportedStructure()

ILIAS\Data\Text\Shape\SimpleDocumentMarkdown::getSupportedStructure ( )
Returns
Structure[]

Reimplemented from ILIAS\Data\Text\TextBase.

Reimplemented in ILIAS\Data\Text\Shape\WordOnlyMarkdown.

Definition at line 32 of file SimpleDocumentMarkdown.php.

32 : array
33 {
34 return [
35 Structure::BOLD,
36 Structure::ITALIC,
37 Structure::HEADING_1,
38 Structure::HEADING_2,
39 Structure::HEADING_3,
40 Structure::HEADING_4,
41 Structure::HEADING_5,
42 Structure::HEADING_6,
43 Structure::UNORDERED_LIST,
44 Structure::ORDERED_LIST,
45 Structure::PARAGRAPH,
46 Structure::LINK,
47 Structure::BLOCKQUOTE,
49 ];
50 }

References ILIAS\Data\Text\CODE.

◆ isRawStringCompliant()

ILIAS\Data\Text\Shape\SimpleDocumentMarkdown::isRawStringCompliant ( string  $text)

Reimplemented in ILIAS\Data\Text\Shape\WordOnlyMarkdown.

Definition at line 57 of file SimpleDocumentMarkdown.php.

57 : bool
58 {
59 $options = mb_regex_set_options();
60 try {
61 mb_regex_set_options("m");
62 return !mb_ereg_match(
63 '.*((' . MRE::IMAGE->value . ')|(' . MRE::REF->value . ')|(' . MRE::IMAGE_REF_USAGE->value . '))',
64 $text
65 );
66 } finally {
67 mb_regex_set_options($options);
68 }
69 }

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