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

Public Member Functions

 __construct (Db $zdb, int|ArrayObject $args=null)
 
 store ()
 
 remove (array $ids=null)
 
 __get (string $name)
 
 __isset (string $name)
 
 displayUrl ()
 
 setType (string $type)
 
 setLinkedMember (int $id=null)
 
 setUrl (string $url)
 
 getSystemTypes (bool $translated=true)
 
 getSystemType (string $type, bool $translated=true)
 

Static Public Member Functions

static getListForMember (int $id_adh=null, string $type=null)
 

Public Attributes

const TABLE = 'socials'
 
const PK = 'id_social'
 
const MASTODON = 'mastodon'
 
const TWITTER = 'twitter'
 
const FACEBOOK = 'facebook'
 
const LINKEDIN = 'linkedin'
 
const VIADEO = 'viadeo'
 
const JABBER = 'jabber'
 
const ICQ = 'icq'
 
const WEBSITE = 'website'
 
const BLOG = 'blog'
 
const DISCORD = 'discord'
 

Constructor & Destructor Documentation

◆ __construct()

Galette\Entity\Social::__construct ( Db  $zdb,
int|ArrayObject  $args = null 
)

Main constructor

Parameters
Db$zdbDatabase instance
int|ArrayObject<string,int|string>|null$args Arguments

Member Function Documentation

◆ __get()

Galette\Entity\Social::__get ( string  $name)

Getter

Parameters
string$nameProperty name
Returns
mixed

◆ __isset()

Galette\Entity\Social::__isset ( string  $name)

Isset Required for twig to access properties via __get

Parameters
string$nameProperty name
Returns
bool

◆ displayUrl()

Galette\Entity\Social::displayUrl ( )

Display URL the best way

Returns
string

◆ getListForMember()

static Galette\Entity\Social::getListForMember ( int  $id_adh = null,
string  $type = null 
)
static

Get socials for a member

Parameters
int | null$id_adhMember id
string | null$typeType to retrieve
Returns
array<int,Social>
Exceptions
Throwable

◆ getSystemType()

Galette\Entity\Social::getSystemType ( string  $type,
bool  $translated = true 
)

Get system social types

Parameters
string$typeSocial type
boolean$translatedReturn translated types (default) or not
Returns
string

◆ getSystemTypes()

Galette\Entity\Social::getSystemTypes ( bool  $translated = true)

Get system social types

Parameters
boolean$translatedReturn translated types (default) or not
Returns
array<string,string>

◆ remove()

Galette\Entity\Social::remove ( array  $ids = null)

Remove current social

Parameters
array<int>|null$ids IDs to remove, default to current id
Returns
boolean

◆ setLinkedMember()

Galette\Entity\Social::setLinkedMember ( int  $id = null)

Set linked member

Parameters
int | null$idMember id
Returns
self

◆ setType()

Galette\Entity\Social::setType ( string  $type)

Set type

Parameters
string$typeType
Returns
self

◆ setUrl()

Galette\Entity\Social::setUrl ( string  $url)

Set URL

Parameters
string$urlValue to set
Returns
self

◆ store()

Galette\Entity\Social::store ( )

Store social in database

Returns
boolean

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