Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\Entity\Texts Class Reference

Public Member Functions

 __construct (Preferences $preferences, RouteParser $routeparser=null)
 
 setMail ()
 
 setChangePasswordURI (Password $password)
 
 setLinkValidity ()
 
 setMemberCardLink (string $link)
 
 setContribLink (string $link)
 
 getTexts (string $ref, string $lang)
 
 setTexts (string $ref, string $lang, string $subject, string $body)
 
 getRefs (string $lang=I18n::DEFAULT_LANG)
 
 installInit (bool $check_first=true)
 
 getSubject ()
 
 getBody ()
 
 getAllDefaults ()
 
 getDefaultTexts (string $lang='en_US')
 
 getLegend ()
 
 setCurrent (string $ref)
 

Public Attributes

const TABLE = "texts"
 
const PK = 'tid'
 
const DEFAULT_REF = 'sub'
 

Protected Member Functions

 getMailPatterns (bool $legacy=true)
 

Detailed Description

Texts class for galette

Author
John Perr johnp.nosp@m.err@.nosp@m.abul..nosp@m.org
Johan Cwiklinski joahn.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\Entity\Texts::__construct ( Preferences  $preferences,
RouteParser  $routeparser = null 
)

Main constructor

Parameters
Preferences$preferencesGalette's preferences
RouteParser | null$routeparserRouteParser instance

Member Function Documentation

◆ getAllDefaults()

Galette\Entity\Texts::getAllDefaults ( )

Get default mail texts for all languages

Returns
array<int,mixed>

◆ getBody()

Galette\Entity\Texts::getBody ( )

Get the body, with all replacements done

Returns
string

◆ getDefaultTexts()

Galette\Entity\Texts::getDefaultTexts ( string  $lang = 'en_US')

Get default texts for specified language

Parameters
string$langRequested lang. Defaults to en_US
Returns
array<int,mixed>

◆ getLegend()

Galette\Entity\Texts::getLegend ( )

Build legend array

Returns
array<string, mixed>

◆ getMailPatterns()

Galette\Entity\Texts::getMailPatterns ( bool  $legacy = true)
protected

Get patterns for mails

Parameters
boolean$legacyWhether to load legacy patterns
Returns
array<string, array<string, string>>

◆ getRefs()

Galette\Entity\Texts::getRefs ( string  $lang = I18n::DEFAULT_LANG)

Ref List

Parameters
string$langRequested language
Returns
array<int,mixed> list of references used for texts

◆ getSubject()

Galette\Entity\Texts::getSubject ( )

Get the subject, with all replacements done

Returns
string

◆ getTexts()

Galette\Entity\Texts::getTexts ( string  $ref,
string  $lang 
)

Get specific text

Parameters
string$refReference of text to get
string$langLanguage texts to get
Returns
ArrayObject<string, int|string> of all text fields for one language.

◆ installInit()

Galette\Entity\Texts::installInit ( bool  $check_first = true)

Initialize texts at install time

Parameters
boolean$check_firstCheck first if it seems initialized
Returns
boolean false if no need to initialize, true if data has been initialized, Exception if error
Exceptions
Throwable

◆ setChangePasswordURI()

Galette\Entity\Texts::setChangePasswordURI ( Password  $password)

Set change password URL

Parameters
Password$passwordPassword instance
Returns
self

◆ setContribLink()

Galette\Entity\Texts::setContribLink ( string  $link)

Set contribution PDF link

Parameters
string$linkLink
Returns
self

◆ setCurrent()

Galette\Entity\Texts::setCurrent ( string  $ref)

Set current text reference

Parameters
string$refReference
Returns
self

◆ setLinkValidity()

Galette\Entity\Texts::setLinkValidity ( )

Set validity link

Returns
self

◆ setMail()

Galette\Entity\Texts::setMail ( )

Set emails replacements

Returns
self

◆ setMemberCardLink()

Galette\Entity\Texts::setMemberCardLink ( string  $link)

Set member card PDF link

Parameters
string$linkLink
Returns
self

◆ setTexts()

Galette\Entity\Texts::setTexts ( string  $ref,
string  $lang,
string  $subject,
string  $body 
)

Set text

Parameters
string$refTexte ref to locate
string$langTexte language to locate
string$subjectSubject to set
string$bodyBody text to set
Returns
bool

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