Methods summary
public
|
|
public
TODO
|
#
serialize( )
Serialize and return the current block layout.
Serialize and return the current block layout.
Returns
TODO
|
public
|
#
unserialize( mixed $data )
Resets the current layout to the value stored in the preferences.
Resets the current layout to the value stored in the preferences.
|
public
|
#
handle( string $action, integer $row, integer $col, string $url = null )
Process a modification to the current layout.
Process a modification to the current layout.
Parameters
- $action
- TODO
- $row
- TODO
- $col
- TODO
- $url
- TODO
Throws
Horde_Exception
|
public
boolean
|
#
updated( )
Has the layout been changed since it was instantiated?
Has the layout been changed since it was instantiated?
Returns
boolean
|
public
array
|
#
getCurrentBlock( )
Get the current block row and column.
Get the current block row and column.
Returns
array [row, col]
|
public
Horde_Core_Block
|
#
getBlock( integer $row, integer $col )
Returns the block object at the specified position.
Returns the block object at the specified position.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
|
public
array
|
#
getBlockAt( integer $row, integer $col )
Returns the coordinates of the block covering the specified
field.
Returns the coordinates of the block covering the specified
field.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
array The top-left row-column-coordinate of the block
covering the specified field or null if the field
is empty.
|
public
array
|
#
getBlockInfo( integer $row, integer $col )
Returns a hash with some useful information about the specified
block.
Returns a hash with some useful information about the specified
block.
Returned hash values:
'app': application name
'block': block name
'params': parameter hash
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
array The information hash.
Throws
Horde_Exception
|
public
|
#
setBlockInfo( integer $row, integer $col, array $info = array() )
Sets a batch of information about the specified block.
Sets a batch of information about the specified block.
Parameters
- $row
- A layout row.
- $col
- A layout column.
- $info
- <p>A hash with information values.
Possible elements are:
'app': application name
'block': block name
'params': parameter hash</p>
Throws
Horde_Exception
|
public
integer
|
#
rows( )
Returns the number of rows in the current layout.
Returns the number of rows in the current layout.
Returns
integer The number of rows.
|
public
integer
|
#
columns( integer $row )
Returns the number of columns in the specified row of the
current layout.
Returns the number of columns in the specified row of the
current layout.
Parameters
- $row
- The row to return the number of columns from.
Returns
integer The number of columns.
Throws
Horde_Exception
|
public
boolean
|
#
isEmpty( integer $row, integer $col )
Checks to see if a given location if being used by a block.
Checks to see if a given location if being used by a block.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
boolean True if the location is empty
False is the location is being used.
|
public
boolean
|
#
isCovered( integer $row, integer $col )
Returns if the field at the specified position is covered by
another block.
Returns if the field at the specified position is covered by
another block.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
boolean True if the specified field is covered.
|
public
boolean
|
#
isBlock( integer $row, integer $col )
Returns if the specified location is the top left field of
a block.
Returns if the specified location is the top left field of
a block.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
boolean True if the specified position is a block, false if
the field doesn't exist, is empty or covered.
|
public
boolean
|
#
isChanged( integer $row, integer $col )
Returns if the specified block has been changed last.
Returns if the specified block has been changed last.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
boolean True if this block is the last one that was changed.
|
public
string
|
#
getControl( string $type, integer $row, integer $col )
Returns a control (linked arrow) for a certain action on the
specified block.
Returns a control (linked arrow) for a certain action on the
specified block.
Parameters
- $type
- <p>A control type in the form
"modification/direction". Possible values for
modification: expand, shrink, move. Possible values
for direction: up, down, left, right.</p>
- $row
- A layout row.
- $col
- A layout column.
Returns
string A link containing an arrow representing the requested
control.
|
public
boolean
|
#
rowExists( integer $row )
Does a row exist?
Parameters
- $row
- The row to look for.
Returns
boolean True if the row exists.
|
public
boolean
|
#
colExists( integer $col )
Does a column exist?
Parameters
- $col
- The column to look for.
Returns
boolean True if the column exists.
|
public
integer
|
#
getWidth( integer $row, integer $col )
Get the width of the block at a given location.
This returns the width if there is a block at this location, otherwise
returns 1.
Get the width of the block at a given location.
This returns the width if there is a block at this location, otherwise
returns 1.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
integer The number of columns this block spans.
|
public
integer
|
#
getHeight( integer $row, integer $col )
Get the height of the block at a given location.
This returns the height if there is a block at this location, otherwise
returns 1.
Get the height of the block at a given location.
This returns the height if there is a block at this location, otherwise
returns 1.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Returns
integer The number of rows this block spans.
|
public
|
#
addBlock( integer $row, integer $col )
Adds an empty block at the specified position.
Adds an empty block at the specified position.
Parameters
- $row
- A layout row.
- $col
- A layout column.
|
public
|
#
addRow( integer $row )
Adds a new row to the layout.
Adds a new row to the layout.
Parameters
- $row
- The number of the row to add
|
public
|
#
addCol( integer $col )
Adds a new column to the layout.
Adds a new column to the layout.
Parameters
- $col
- The number of the column to add
|
public
|
#
removeBlock( integer $row, integer $col )
Removes a block.
Parameters
- $row
- A layout row.
- $col
- A layout column.
|
public
boolean
|
#
removeRowIfEmpty( integer $row )
Removes a row if it's empty.
Removes a row if it's empty.
Parameters
- $row
- The number of the row to to check
Returns
boolean True if the row is now removed.
False if the row still exists.
|
public
boolean
|
#
removeColIfEmpty( integer $col )
Removes a column if it's empty.
Removes a column if it's empty.
Parameters
- $col
- The number of the column to to check
Returns
boolean True if the column is now removed.
False if the column still exists.
|
public
|
#
moveUp( integer $row, integer $col )
Moves a block one row up.
Moves a block one row up.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
|
#
moveDown( integer $row, integer $col )
Moves a block one row down.
Moves a block one row down.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
boolean
|
#
moveDownBelow( integer $row )
Moves all blocks below a certain row one row down.
Moves all blocks below a certain row one row down.
Parameters
Returns
boolean True if all rows could be moved down.
|
public
|
#
moveLeft( integer $row, integer $col )
Moves a block one column left.
Moves a block one column left.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
|
#
moveRight( integer $row, integer $col )
Moves a block one column right.
Moves a block one column right.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
boolean
|
#
moveRightAfter( integer $col )
Moves all blocks after a certain column one column right.
Moves all blocks after a certain column one column right.
Parameters
Returns
boolean True if all columns could be moved right.
|
public
|
#
expandUp( integer $row, integer $col )
Makes a block one row taller by moving the top up.
Makes a block one row taller by moving the top up.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
|
#
expandDown( integer $row, integer $col )
Makes a block one row taller by moving the bottom down.
Makes a block one row taller by moving the bottom down.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
|
#
expandLeft( integer $row, integer $col )
Makes a block one column wider by moving the left side out.
Makes a block one column wider by moving the left side out.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
|
#
expandRight( integer $row, integer $col )
Makes a block one column wider by moving the right side out.
Makes a block one column wider by moving the right side out.
Parameters
- $row
- A layout row.
- $col
- A layout column.
Throws
Horde_Exception
|
public
|
#
shrinkUp( integer $row, integer $col )
Makes a block one row lower by moving the top down.
Makes a block one row lower by moving the top down.
Parameters
- $row
- A layout row.
- $col
- A layout column.
|
public
|
#
shrinkDown( integer $row, integer $col )
Makes a block one row lower by moving the bottom up.
Makes a block one row lower by moving the bottom up.
Parameters
- $row
- A layout row.
- $col
- A layout column.
|
public
|
#
shrinkLeft( integer $row, integer $col )
Makes a block one column narrower by moving the left side in.
Makes a block one column narrower by moving the left side in.
Parameters
- $row
- A layout row.
- $col
- A layout column.
|
public
|
#
shrinkRight( integer $row, integer $col )
Makes a block one column narrower by moving the right side in.
Makes a block one column narrower by moving the right side in.
Parameters
- $row
- A layout row.
- $col
- A layout column.
|
public
integer
|
#
count( )
Returns the number of blocks in the current layout.
Returns the number of blocks in the current layout.
Returns
integer The number of blocks.
Implementation of
Countable::count()
|