XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsBlockHandler Class Reference
Inheritance diagram for XoopsBlockHandler:
XoopsObjectHandler

Public Member Functions

create ($isNew=true)
 
createByInfo ($info)
 
get ($id)
 
 insert (&$block, $autolink=false)
 
 delete (&$block)
 
getObjects ($criteria=null, $id_as_key=false)
 
getObjectsDirectly ($criteria=null)
 
getList ($criteria=null)
 
getAllBlocksByGroup ($groupid, $asobject=true, $side=null, $visible=null, $orderby='b.weight, b.bid', $isactive=1)
 
getAllBlocks ($rettype='object', $side=null, $visible=null, $orderby='side, weight, bid', $isactive=1)
 
getByModule ($moduleid, $asobject=true)
 
getAllByGroupModule ($groupid, $module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight, b.bid', $isactive=1)
 
getBlocks ($groupid, $mid=false, $blockFlag=SHOW_BLOCK_ALL, $orderby='b.weight, b.bid')
 
getNonGroupedBlocks ($module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight, b.bid', $isactive=1)
 
 countSimilarBlocks ($moduleId, $funcNum, $showFunc=null)
 
 syncIsActive ($moduleId, $isActive, $force=false)
 
- Public Member Functions inherited from XoopsObjectHandler
 __construct (&$db)
 
create ()
 
 insert (&$object)
 

Additional Inherited Members

- Data Fields inherited from XoopsObjectHandler
 $db
 

Detailed Description

Definition at line 341 of file block.php.

Member Function Documentation

◆ countSimilarBlocks()

countSimilarBlocks ( $moduleId,
$funcNum,
$showFunc = null )

Definition at line 928 of file block.php.

◆ create()

& create ( $isNew = true)

create a new block

See also
XoopsBlock
Parameters
bool$isNewis the new block new??
Returns
object XoopsBlock reference to the new block

Definition at line 351 of file block.php.

◆ createByInfo()

& createByInfo ( $info)

Create a new block by array that is defined in xoops_version. You must be careful that the value that it is returned doesn't have $mid, $func_num and $dirname.

Parameters
array$info
Returns
object XoopsBlock

Definition at line 368 of file block.php.

◆ delete()

delete ( & $block)

delete a block from the database

Parameters
objectXoopsBlock $block reference to the block to delete
Returns
bool TRUE if succesful

Reimplemented from XoopsObjectHandler.

Definition at line 494 of file block.php.

◆ get()

& get ( $id)

retrieve a specific XoopsBlock

See also
XoopsBlock
Parameters
int$idbid of the block to retrieve
Returns
object XoopsBlock reference to the block

Reimplemented from XoopsObjectHandler.

Definition at line 396 of file block.php.

◆ getAllBlocks()

& getAllBlocks ( $rettype = 'object',
$side = null,
$visible = null,
$orderby = 'side,
weight ,
bid' ,
$isactive = 1 )

Definition at line 659 of file block.php.

◆ getAllBlocksByGroup()

& getAllBlocksByGroup ( $groupid,
$asobject = true,
$side = null,
$visible = null,
$orderby = 'b.weight,
b.bid' ,
$isactive = 1 )

get all the blocks that match the supplied parameters

Parameters
groupid$groupid(can be an array)
bool$asobject
$side0: sideblock - left 1: sideblock - right 2: sideblock - left and right 3: centerblock - left 4: centerblock - right 5: centerblock - center 6: centerblock - left, right, center
$visible0: not visible 1: visible
string$orderbyof the blocks
int$isactive
Returns
array

Definition at line 605 of file block.php.

◆ getAllByGroupModule()

& getAllByGroupModule ( $groupid,
$module_id = 0,
$toponlyblock = false,
$visible = null,
$orderby = 'b.weight,
b.bid' ,
$isactive = 1 )

Gets block objects by groups & modules.

Remarks
This is the special API for base modules like Legacy.
Parameters
$groupid
int$module_id
bool$toponlyblock
null$visible
string$orderby
int$isactive
Returns
array

Definition at line 746 of file block.php.

◆ getBlocks()

& getBlocks ( $groupid,
$mid = false,
$blockFlag = SHOW_BLOCK_ALL,
$orderby = 'b.weight,
b.bid'  )

Return block instance array by $groupid, $mid and $blockFlag. This function is new function of Cube and used from controller.

Remarks
This is the special API for base modules like Legacy.
Parameters
$groupid
bool$mid
int$blockFlag
string$orderby
Returns
array

Definition at line 806 of file block.php.

◆ getByModule()

& getByModule ( $moduleid,
$asobject = true )

Definition at line 713 of file block.php.

◆ getList()

& getList ( $criteria = null)

get a list of blocks matchich certain conditions

Parameters
string$criteriaconditions to match
Returns
array array of blocks matching the conditions

Definition at line 578 of file block.php.

◆ getNonGroupedBlocks()

& getNonGroupedBlocks ( $module_id = 0,
$toponlyblock = false,
$visible = null,
$orderby = 'b.weight,
b.bid' ,
$isactive = 1 )
Remarks
This is the special API for base modules like Legacy.
Parameters
int$module_id
bool$toponlyblock
null$visible
string$orderby
int$isactive
Returns
array

Definition at line 880 of file block.php.

◆ getObjects()

& getObjects ( $criteria = null,
$id_as_key = false )

retrieve array of XoopsBlocks meeting certain conditions

Parameters
object$criteriaCriteriaElement with conditions for the blocks
bool$id_as_keyshould the blocks' bid be the key for the returned array?
Returns
array XoopsBlocks matching the conditions

Definition at line 516 of file block.php.

◆ getObjectsDirectly()

& getObjectsDirectly ( $criteria = null)

Definition at line 543 of file block.php.

◆ insert()

insert ( & $block,
$autolink = false )

write a new block into the database

Parameters
objectXoopsBlock $block reference to the block to insert
bool$autolink
Returns
bool TRUE if succesful

Definition at line 425 of file block.php.

◆ syncIsActive()

syncIsActive ( $moduleId,
$isActive,
$force = false )

Changes 'isactive' value of the module specified by $moduleId.

Remarks
This method should be called by only the base modules like Legacy.
Parameters
$moduleId
$isActive
bool$force

Definition at line 957 of file block.php.


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