Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Asset_Edit_Interface Class Reference
Inheritance diagram for Asset_Edit_Interface:
MySource_Object

Public Member Functions

 Asset_Edit_Interface ($type_code)
 
 getScreens ()
 
 _determinePreviewUrl (&$owner, &$o)
 
 paint (&$owner, &$o, $creating)
 
 paintInline (&$owner, &$o, $creating, $active_screen)
 
 printEditInterface ($screen, &$owner, &$o, $creating=FALSE, $create_sections=Array())
 
 acquireLimboLocks (&$owner, &$o, $active_screen='details', $screen_lock_type=NULL)
 
 paintLayout (&$owner, &$o, &$layout)
 
 getKeywordsReplacementsForPaint (&$owner, &$o, &$layout, $layout_keywords_order, $set_keywords_replacement=TRUE, $invoke_backend=FALSE)
 
 _getStaticScreenKeywordReplacements (&$owner, &$o, $screen, $static_keywords, $get_screen=FALSE, Array $layout_options=Array())
 
 _getLayoutKeywordReplacements (&$root, &$o, &$owner, $layout_keywords, $screen='details', $get_screen=FALSE)
 
 process (&$owner, &$o, $creating)
 
 processInline (&$owner, &$o, $creating, $current_screen)
 
 _getAccess (&$owner, $node, $prefix, $inherit_access=NULL)
 
 getAllowedScreens (&$owner)
 
 findFile ($file_name, $throw_error=TRUE)
 
 findLanguageFile ($file_name, $include_asset=TRUE)
 
findScreen ($screen_name)
 
 _getCreateSections ($painting)
 
 includeStaticScreen ($screen)
 
 findSpecificFile ($file_name, $throw_error=TRUE)
 
findSpecificScreen ($specific_file)
 
 getSimpleEditKeywords ($asset_type='page_standard', &$o)
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

 $_type_code = ''
 
 $_edit_fns = NULL
 
 $_dirs = Array()
 
 $_screens = Array()
 
 $_default_screen = ''
 
- Data Fields inherited from MySource_Object
 $_tmp
 

Detailed Description

Definition at line 36 of file asset_edit_interface.inc.

Member Function Documentation

_determinePreviewUrl ( $owner,
$o 
)

Sets the preview url and returns the closest parent id which is used in paint() only

Parameters
object&$ownerthe asset whose interface we are painting
object&$othe outputter class
Returns
int private

Definition at line 156 of file asset_edit_interface.inc.

_getAccess ( $owner,
  $node,
  $prefix,
  $inherit_access = NULL 
)

Reads the write_access and read_access attributes of the passed node and returns at bitmask that can be used with the SQ_EI_READ and SQ_EI_WRITE constants

Parameters
object&$ownerthe asset whose interface we are painting
object$nodethe xml node to check for 'write_access' and 'read_access' attrs
string$prefixthe prefix
int$inherit_accessused if an access is not specified
Returns
int private

Definition at line 2122 of file asset_edit_interface.inc.

_getCreateSections (   $painting)

Returns the Sections and fields that are to be used in a create interface and the screen that these belong to

Parameters
boolean$paintingif we are painting or processing
Returns
array private

Definition at line 2425 of file asset_edit_interface.inc.

_getLayoutKeywordReplacements ( $root,
$o,
$owner,
  $layout_keywords,
  $screen = 'details',
  $get_screen = FALSE 
)

Gets the keyword replacements to be used in the layout

Parameters
object&$rootthe root of the xml screen
object&$othe backend outputter object
object&$ownerthe owner of this asset
array$layout_keywordsan array of keywords to get replacements for
string$screenthe name of the current screen
boolean$get_screenif TRUE the entire screen will be captured into a replacement
Returns
boolean private

Definition at line 1578 of file asset_edit_interface.inc.

_getStaticScreenKeywordReplacements ( $owner,
$o,
  $screen,
  $static_keywords,
  $get_screen = FALSE,
Array  $layout_options = Array() 
)

Gets a keyword replacement for static screens.

Parameters
object&$ownerthe owner of this asset
object&$othe backend outputter object
string$screenthe static screen to get a replacement for
array | NULL$static_keywordsthe wantedkeyowrd of this static screen
boolean$get_screenif TRUE the entire screen will be captured into a replacement
Array$layout_optionsthe Simple Edit layout options
Returns
boolean private

Definition at line 1538 of file asset_edit_interface.inc.

acquireLimboLocks ( $owner,
$o,
  $active_screen = 'details',
  $screen_lock_type = NULL 
)

Acquires any locks needed by limbo

Parameters
object&$ownerthe owner of this interface
object&$othe backend outputter
string$active_screenthe active screen we are on
string$screen_lock_typethe lock type of this screen
Returns
boolean public

Definition at line 1171 of file asset_edit_interface.inc.

Asset_Edit_Interface (   $type_code)

Constructor

Parameters
string$type_codepublic

Definition at line 77 of file asset_edit_interface.inc.

findFile (   $file_name,
  $throw_error = TRUE 
)

Takes the requested filename and searches back up the directories to find the matching file closest to the type of the asset that we are creating or editing

Parameters
string$file_namethe file to find
string$throw_errorthis boolean controls if the findFile should throw an error or not
Returns
string public

Definition at line 2298 of file asset_edit_interface.inc.

findLanguageFile (   $file_name,
  $include_asset = TRUE 
)

Find a list of language files to extract from, searching up the directories for the closest match in the current language, then running through fallbacks (ie. the system's default backend locale)

Parameters
string$file_namethe file to find
boolean$include_assetwhether the base asset is included in search
Returns
array public

Definition at line 2331 of file asset_edit_interface.inc.

& findScreen (   $screen_name)

Find the closest applicable screen and return the root node

Probably need a better way of doing this, but basically this is what it does:

  1. Looks for the closest screen structure file, if it is EMPTY then return the empty file - we don't need any localised stuff
  2. If it is not empty, we then look for the closest language file - even if a partial version of a parent is there it should be localised in any case
Parameters
string$screen_namethe whole screen name (including the 'screen_' or 'static_screen_' part)
Returns
object public

Definition at line 2385 of file asset_edit_interface.inc.

findSpecificFile (   $file_name,
  $throw_error = TRUE 
)

Takes the requested filename and searches back up the directories to find the matching file closest to the type of the asset that we are creating or editing

Parameters
string$file_namethe file to find
string$throw_errorthis boolean controls if the findFile should throw an error or not
Returns
string public

Definition at line 2513 of file asset_edit_interface.inc.

& findSpecificScreen (   $specific_file)

works the same way as findScreen but uses a specific file name instead

Parameters
string$specific_filethe name of the specific file
Returns
object public

Definition at line 2533 of file asset_edit_interface.inc.

getAllowedScreens ( $owner)

Get an array of the screens we are allowed to access for the asset we are painting

Parameters
object&$ownerthe asset whose interface we are painting
Returns
array public

Definition at line 2243 of file asset_edit_interface.inc.

getKeywordsReplacementsForPaint ( $owner,
$o,
$layout,
  $layout_keywords_order,
  $set_keywords_replacement = TRUE,
  $invoke_backend = FALSE 
)

Gets keywords replacements for printing limbo in a specified layout

Parameters
object&$ownerthe owner of this interface
object&$othe backend outputter
object&$layoutthe layout to be painted
array&$layout_keywords_orderorder of appearence of the keywords
boolean&$set_keywords_replacementset keyword in body or just return replacements
boolean&$invoke_backendthe layout to be painted
Returns
mixed public

Definition at line 1301 of file asset_edit_interface.inc.

getScreens ( )

Returns the screens array

Returns
array public

Definition at line 140 of file asset_edit_interface.inc.

getSimpleEditKeywords (   $asset_type = 'page_standard',
$o 
)

prerequisites: the asset_type should exist $asset_type and the outputter should be already initialised. Info: This function will print all the keywords of the asset type passed as a parameter. outcome: It will use the outputter $o to display all the simple edit keywords available

Parameters
string$asset_typethe asset type
object&$othe outputter
Returns
void public

Definition at line 2579 of file asset_edit_interface.inc.

includeStaticScreen (   $screen)

Require the file which contains the interface functions for the passed screen

Parameters
string$screenthe code for the static screen we are including
Returns
void public

Definition at line 2496 of file asset_edit_interface.inc.

paint ( $owner,
$o,
  $creating 
)

Paints the interface for the currently selected frame

Parameters
object&$ownerthe asset whose interface we are painting
object&$othe outputter class
boolean$creatingwhether we are painting the default create interface or something else
Returns
NULL public

LAYOUTS /// /////////////

Definition at line 245 of file asset_edit_interface.inc.

paintInline ( $owner,
$o,
  $creating,
  $active_screen 
)

Paints out the interface for the passed asset inline

This means that it doesn't include the Commit Button, Locking, Page Headings, Screen Menu

Parameters
object&$ownerthe asset whose interface we are painting
object&$othe outputter class
boolean$creatingwhether we are processing the default create screen
string$active_screenif we are not creating, use this screen
Returns
boolean public

Definition at line 819 of file asset_edit_interface.inc.

paintLayout ( $owner,
$o,
$layout 
)

Wrapper Function : Prints limbo in a specified layout

Parameters
object&$ownerthe owner of this interface
object&$othe backend outputter
object&$layoutthe layout to be painted
Returns
boolean public

Definition at line 1264 of file asset_edit_interface.inc.

printEditInterface (   $screen,
$owner,
$o,
  $creating = FALSE,
  $create_sections = Array() 
)

Print the edit interface from the supplied XML file(s)

Parameters
string$screenThe XML file to print
object&$ownerThe asset having its interface printed
object&$oThe outputter object to use to paint
boolean$creatingWhether we are creating the asset rather than editing
array$create_sectionsThe sections to print when creating
Returns
boolean public

Definition at line 961 of file asset_edit_interface.inc.

process ( $owner,
$o,
  $creating 
)

Processes the results of the form posting, returns TRUE anything was processed/changed

Parameters
object&$ownerthe asset whose interface we are painting
object&$othe outputter class
boolean$creatingwhether we are creating or editing
Returns
boolean public

Definition at line 1810 of file asset_edit_interface.inc.

processInline ( $owner,
$o,
  $creating,
  $current_screen 
)

Processes the results of the form posting, ignores the screen that is set in the get vars, relies on being passed the correct screen

Parameters
object&$ownerthe asset whose interface we are painting
object&$othe outputter class
boolean$creatingwhether we are creating or editing
string$current_screenCurrent Screen
Returns
boolean public

Definition at line 1834 of file asset_edit_interface.inc.


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