Overview

Packages

  • Auth
  • Core
  • Horde
    • Imsp
  • None
  • Notification

Classes

  • Horde
  • Horde_Config
  • Horde_Config_Form
  • Horde_Core_ActiveSync_Connector
  • Horde_Core_ActiveSync_Driver
  • Horde_Core_Ajax_Application
  • Horde_Core_Ajax_Imple
  • Horde_Core_Ajax_Imple_AutoCompleter
  • Horde_Core_Ajax_Imple_Geocoder_Geonames
  • Horde_Core_Ajax_Imple_SpellChecker
  • Horde_Core_Alarm_Handler_Notify
  • Horde_Core_Auth_Application
  • Horde_Core_Auth_Composite
  • Horde_Core_Auth_Ldap
  • Horde_Core_Auth_Msad
  • Horde_Core_Auth_Shibboleth
  • Horde_Core_Auth_Signup_Base
  • Horde_Core_Auth_Signup_Form
  • Horde_Core_Auth_Signup_Null
  • Horde_Core_Auth_Signup_Sql
  • Horde_Core_Auth_Signup_SqlObject
  • Horde_Core_Autoloader_Callback_Mime
  • Horde_Core_Autoloader_Callback_Nls
  • Horde_Core_Block
  • Horde_Core_Block_Collection
  • Horde_Core_Block_Layout
  • Horde_Core_Block_Layout_Manager
  • Horde_Core_Block_Layout_View
  • Horde_Core_Block_Upgrade
  • Horde_Core_Browser
  • Horde_Core_Bundle
  • Horde_Core_Cli
  • Horde_Core_Controller_NotFound
  • Horde_Core_Controller_RequestConfiguration
  • Horde_Core_Controller_RequestMapper
  • Horde_Core_Controller_SettingsFinder
  • Horde_Core_Db_Migration
  • Horde_Core_Factory_ActiveSyncBackend
  • Horde_Core_Factory_ActiveSyncServer
  • Horde_Core_Factory_ActiveSyncState
  • Horde_Core_Factory_Ajax
  • Horde_Core_Factory_Alarm
  • Horde_Core_Factory_Auth
  • Horde_Core_Factory_AuthSignup
  • Horde_Core_Factory_Base
  • Horde_Core_Factory_BlockCollection
  • Horde_Core_Factory_Browser
  • Horde_Core_Factory_Cache
  • Horde_Core_Factory_Crypt
  • Horde_Core_Factory_Data
  • Horde_Core_Factory_Db
  • Horde_Core_Factory_DbBase
  • Horde_Core_Factory_DbPear
  • Horde_Core_Factory_Dns
  • Horde_Core_Factory_Editor
  • Horde_Core_Factory_Facebook
  • Horde_Core_Factory_Group
  • Horde_Core_Factory_History
  • Horde_Core_Factory_HttpClient
  • Horde_Core_Factory_Identity
  • Horde_Core_Factory_Image
  • Horde_Core_Factory_Imple
  • Horde_Core_Factory_Imsp
  • Horde_Core_Factory_ImspAuth
  • Horde_Core_Factory_Injector
  • Horde_Core_Factory_KolabServer
  • Horde_Core_Factory_KolabSession
  • Horde_Core_Factory_KolabStorage
  • Horde_Core_Factory_Ldap
  • Horde_Core_Factory_Lock
  • Horde_Core_Factory_Logger
  • Horde_Core_Factory_LoginTasks
  • Horde_Core_Factory_Mail
  • Horde_Core_Factory_Mapper
  • Horde_Core_Factory_Matcher
  • Horde_Core_Factory_Memcache
  • Horde_Core_Factory_MimeViewer
  • Horde_Core_Factory_Notification
  • Horde_Core_Factory_Perms
  • Horde_Core_Factory_PermsCore
  • Horde_Core_Factory_Prefs
  • Horde_Core_Factory_Request
  • Horde_Core_Factory_Secret
  • Horde_Core_Factory_SessionHandler
  • Horde_Core_Factory_Share
  • Horde_Core_Factory_ShareBase
  • Horde_Core_Factory_Template
  • Horde_Core_Factory_TextFilter
  • Horde_Core_Factory_ThemesCache
  • Horde_Core_Factory_Token
  • Horde_Core_Factory_Tree
  • Horde_Core_Factory_Twitter
  • Horde_Core_Factory_UrlShortener
  • Horde_Core_Factory_Vfs
  • Horde_Core_Factory_View
  • Horde_Core_Factory_Weather
  • Horde_Core_Group_Ldap
  • Horde_Core_Log_Logger
  • Horde_Core_LoginTasks
  • Horde_Core_LoginTasks_Backend_Horde
  • Horde_Core_LoginTasks_SystemTask_Upgrade
  • Horde_Core_Mime_Viewer_Syntaxhighlighter
  • Horde_Core_Mime_Viewer_Vcard
  • Horde_Core_Notification_Event_Status
  • Horde_Core_Notification_Handler_Decorator_Hordelog
  • Horde_Core_Notification_Storage_Session
  • Horde_Core_Perms
  • Horde_Core_Perms_Ui
  • Horde_Core_Prefs_Cache_Session
  • Horde_Core_Prefs_Identity
  • Horde_Core_Prefs_Storage_Configuration
  • Horde_Core_Prefs_Storage_Hooks
  • Horde_Core_Prefs_Storage_Upgrade
  • Horde_Core_Prefs_Ui
  • Horde_Core_Prefs_Ui_Widgets
  • Horde_Core_Share_Driver
  • Horde_Core_Share_FactoryCallback
  • Horde_Core_Sidebar
  • Horde_Core_Text_Filter_Bbcode
  • Horde_Core_Text_Filter_Emails
  • Horde_Core_Text_Filter_Emoticons
  • Horde_Core_Text_Filter_Highlightquotes
  • Horde_Core_Translation
  • Horde_Core_Tree_Html
  • Horde_Core_Tree_Javascript
  • Horde_Core_Tree_Simplehtml
  • Horde_Core_Ui_FlagImage
  • Horde_Core_Ui_JsCalendar
  • Horde_Core_Ui_Language
  • Horde_Core_Ui_Layout
  • Horde_Core_Ui_ModalFormRenderer
  • Horde_Core_Ui_Pager
  • Horde_Core_Ui_Tabs
  • Horde_Core_Ui_TagCloud
  • Horde_Core_Ui_VarRenderer
  • Horde_Core_Ui_VarRenderer_Html
  • Horde_Core_Ui_VarRenderer_TablesetHtml
  • Horde_Core_Ui_Widget
  • Horde_ErrorHandler
  • Horde_Help
  • Horde_Menu
  • Horde_Registry
  • Horde_Registry_Api
  • Horde_Registry_Application
  • Horde_Registry_Caller
  • Horde_Registry_Nlsconfig
  • Horde_Script_Files
  • Horde_Session
  • Horde_Session_Null
  • Horde_Themes
  • Horde_Themes_Cache
  • Horde_Themes_Css
  • Horde_Themes_Element
  • Horde_Themes_Image
  • Horde_Themes_Sound

Exceptions

  • Horde_Exception_HookNotSet
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Core_Block_Layout_Manager

Provides manipulation of block layouts.

Copyright 2003-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Horde_Core_Block_Layout
Extended by Horde_Core_Block_Layout_Manager implements Countable
Package: Core
Category: Horde
License: LGPL 2.1
Author: Mike Cochrane mike@graftonhall.co.nz
Author: Jan Schneider jan@horde.org
Located at Horde/Core/Block/Layout/Manager.php
Methods summary
public
# __construct( Horde_Core_Block_Collection $collection )

Constructor.

Constructor.

Parameters

$collection
TODO
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

Horde_Core_Block
The block from that position.
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?

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?

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.

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

$row
A layout row.

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

$col
A layout column.

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()
Methods inherited from Horde_Core_Block_Layout
getActionUrl(), getHeaderIcons(), isRemovable()
API documentation generated by ApiGen