Dotclear 2.24
Loading...
Searching...
No Matches
dcBlogroll Class Reference

Public Member Functions

 __construct (dcBlog $blog)
 
 getLinks (array $params=[])
 
 getLangs (array $params=[])
 
 getLink (string $id)
 
 addLink (string $title, string $href, string $desc='', string $lang='', string $xfn='')
 
 updateLink (string $id, string $title, string $href, string $desc='', string $lang='', string $xfn='')
 
 updateCategory (string $id, string $desc)
 
 addCategory (string $title)
 
 delItem (string $id)
 
 updateOrder (string $id, string $position)
 
 getLinksHierarchy (dcRecord $rs)
 

Data Fields

const LINK_TABLE_NAME = 'link'
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( dcBlog  $blog)

Constructs a new instance.

Parameters
dcBlog$blogThe blog

References dcCore\app(), and LINK_TABLE_NAME.

Member Function Documentation

◆ getLinks()

getLinks ( array  $params = [])

Gets the links.

Parameters
array$paramsThe parameters
Returns
dcRecord The links.

Referenced by getLink().

◆ getLangs()

getLangs ( array  $params = [])

Gets the links.

Parameters
array$paramsThe parameters
Returns
dcRecord The links.

◆ getLink()

getLink ( string  $id)

Gets a link.

Parameters
string$idThe identifier
Returns
dcRecord The link.

References getLinks().

◆ addLink()

addLink ( string  $title,
string  $href,
string  $desc = '',
string  $lang = '',
string  $xfn = '' 
)

Adds a link.

Parameters
string$titleThe title
string$hrefThe href
string$descThe description
string$langThe language
string$xfnThe xfn
Exceptions
Exception

References if.

◆ updateLink()

updateLink ( string  $id,
string  $title,
string  $href,
string  $desc = '',
string  $lang = '',
string  $xfn = '' 
)

Update a link

Parameters
string$idThe identifier
string$titleThe title
string$hrefThe href
string$descThe description
string$langThe language
string$xfnThe xfn
Exceptions
Exception

◆ updateCategory()

updateCategory ( string  $id,
string  $desc 
)

Update a category

Parameters
string$idThe identifier
string$descThe description
Exceptions
Exception

◆ addCategory()

addCategory ( string  $title)

Adds a category.

Parameters
string$titleThe title
Exceptions
Exception
Returns
int The category ID

◆ delItem()

delItem ( string  $id)

Delete a link

Parameters
string$idThe identifier

◆ updateOrder()

updateOrder ( string  $id,
string  $position 
)

Update a link order

Parameters
string$idThe identifier
string$positionThe position

◆ getLinksHierarchy()

getLinksHierarchy ( dcRecord  $rs)

Gets the links hierarchy.

Parameters
dcRecord$rsThe links
Returns
array The links hierarchy.

References dcRecord\rows().

Field Documentation

◆ LINK_TABLE_NAME

const LINK_TABLE_NAME = 'link'

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