BenManu\StyleGuide\KSSSection
Synopsis
class KSSSection
extends Section
{
- // members
- private static array $casting = ;
- // Inherited members from Section
- protected string $rawComment;
- protected SplFileObject $file;
- // methods
- public string getTitle()
- public string getDescription()
- public string getMarkup()
- public void getMarkupNormal()
- public boolean hasMarkup()
- public string getDeprecated()
- public string getExperimental()
- public string getCompatibility()
- public array getModifiers()
- public array getParameters()
- public HTMLText getTemplate()
- public HTMLText getSectionTemplate()
- public string getReference()
- protected string getReferenceDotDelimited()
- public boolean hasReference()
- public static boolean isReferenceNumeric()
- public array getReferenceParts()
- public static string trimReference()
- public static string normalizeReference()
- public boolean belongsToReference()
- public int getDepth()
- public static int calcDepth()
- public int getDepthScore()
- public static int|null calcDepthScore()
- public static int depthSort()
- public static int depthScoreSort()
- public static int alphaDepthScoreSort()
- protected array getCommentSections()
- protected string getTitleComment()
- protected string getMarkupComment()
- protected string getDeprecatedComment()
- protected string getExperimentalComment()
- protected string getCompatibilityComment()
- protected string getReferenceComment()
- protected string getModifiersComment()
- protected string getParametersComment()
- protected String getTemplateComment()
- protected String getSectionTemplateComment()
- public Boolean getActive()
- public String getReferenceID()
- public String getLink()
- public void forTemplate()
- // Inherited methods from Section
- public void __construct()
- public string getFilename()
- public String getRenderedTemplate()
Hierarchy
Extends
Members
private
- $casting
protected
- $file
—
\SplFileObject
The file where the Comment Block came from - $rawComment
—
string
The raw Comment Block
Methods
protected
- getCommentSections() — Returns the comment block used when creating the section as an array of paragraphs within the comment block
- getCompatibilityComment() — Returns the part of the KSS Comment Block that contains the compatibility notice
- getDeprecatedComment() — Returns the part of the KSS Comment Block that contains the deprecated notice
- getExperimentalComment() — Returns the part of the KSS Comment Block that contains the experimental notice
- getMarkupComment() — Returns the part of the KSS Comment Block that contains the markup
- getModifiersComment() — Returns the part of the KSS Comment Block that contains the modifiers
- getParametersComment() — Returns the part of the KSS Comment Block that contains the $parameters
- getReferenceComment() — Gets the part of the KSS Comment Block that contains the section reference
- getReferenceDotDelimited() — Returns the reference dot delimited
- getSectionTemplateComment() — Returns the part of the KSS Comment Block that contains the section template
- getTemplateComment() — Returns the part of the KSS Comment Block that contains the template
- getTitleComment() — Gets the title part of the KSS Comment Block
public
- alphaDepthScoreSort() — Function to help sort sections either by their depth score if numeric or alphabetically if non-numeric.
- belongsToReference() — Checks to see if a section belongs to a specified reference
- calcDepth() — Calculates and returns the depth of a section reference
- calcDepthScore() — Calculates and returns the depth score for the section. Useful for sorting sections correctly by their section reference numbers
- depthScoreSort() — Function to help sort sections by their depth score
- depthSort() — Function to help sort sections by depth and then depth score or alphabetically
- forTemplate()
- getActive() — Checks if the current section is the active route.
- getCompatibility() — Returns the compatibility notice defined in the section
- getDeprecated() — Returns the deprecation notice defined in the section
- getDepth() — Helper method for calculating the depth of the instantiated section
- getDepthScore() — Helper method for calculating the score of the instantiated section
- getDescription() — Returns the description for the section
- getExperimental() — Returns the experimental notice defined in the section
- getLink() — Returns the link to this section formatted on the StyleGuideController.
- getMarkup() — Returns the markup defined in the section
- getMarkupNormal() — Returns the markup for the normal element (without modifierclass)
- getModifiers() — Returns the modifiers used in the section
- getParameters() — Returns the $parameters used in the section
- getReference() — Returns the reference number for the section
- getReferenceID() — Get the section reference formatted for url use.
- getReferenceParts() — Returns the references as an array of its parts
- getSectionTemplate() — Returns the section template if defined.
- getTemplate() — Returns the template if defined, rendered with the fixture or controller.
- getTitle() — Returns the title of the section
- hasMarkup() — Returns a boolean value regarding the presence of markup in the kss-block
- hasReference() — Checks if the Section has a reference
- isReferenceNumeric() — Checks to see if a reference is numeric
- normalizeReference() — Normalizes references so all delimiters are standardized
- trimReference() — Trims off all trailing zeros and periods on a reference
Inherited from BenManu\StyleGuide\Section
public
- getFilename() — Returns the source filename for where the comment block was located
- getRenderedTemplate() — Render a SilverStripe template with fixture data if set.