Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
OpenSpout\Writer\ODS\Manager\Style\StyleManager Class Reference
Inheritance diagram for OpenSpout\Writer\ODS\Manager\Style\StyleManager:
OpenSpout\Writer\Common\Manager\Style\AbstractStyleManager OpenSpout\Writer\Common\Manager\Style\StyleManagerInterface

Public Member Functions

 __construct (StyleRegistry $styleRegistry, AbstractOptions $options)
 
 applyExtraStylesIfNeeded (Cell $cell)
 Apply additional styles if the given row needs it.
 
 getStylesXMLFileContent (int $numWorksheets)
 Returns the content of the "styles.xml" file, given a list of styles.
 
 registerStyle (Style $style)
 Registers the given style as a used style.
 

Protected Member Functions

 getDefaultStyle ()
 Returns the default style.
 

Protected Attributes

AbstractStyleRegistry AbstractStyleRegistry $styleRegistry
 Registry for all used styles.
 

Member Function Documentation

◆ applyExtraStylesIfNeeded()

OpenSpout\Writer\Common\Manager\Style\AbstractStyleManager::applyExtraStylesIfNeeded ( Cell $cell)
finalinherited

Apply additional styles if the given row needs it.

Typically, set "wrap text" if a cell contains a new line.

Return values
PossiblyUpdatedStyleThe eventually updated style

Implements OpenSpout\Writer\Common\Manager\Style\StyleManagerInterface.

◆ getDefaultStyle()

OpenSpout\Writer\Common\Manager\Style\AbstractStyleManager::getDefaultStyle ( )
finalprotectedinherited

Returns the default style.

Return values
StyleDefault style

◆ getStylesXMLFileContent()

OpenSpout\Writer\ODS\Manager\Style\StyleManager::getStylesXMLFileContent ( int $numWorksheets)

Returns the content of the "styles.xml" file, given a list of styles.

Parameters
int$numWorksheetsNumber of worksheets created

◆ registerStyle()

OpenSpout\Writer\Common\Manager\Style\AbstractStyleManager::registerStyle ( Style $style)
finalinherited

Registers the given style as a used style.

Duplicate styles won't be registered more than once.

Parameters
Style$styleThe style to be registered
Return values
Stylethe registered style, updated with an internal ID

Implements OpenSpout\Writer\Common\Manager\Style\StyleManagerInterface.


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