Home « Server software «
Documentation: files/file.php
Class File extends Anchor - The file anchor
This class implements the Anchor interface for posted files.This script is a reference file of this system.
Voir aussi:
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
get_focus() - Get the focus for this anchor
function get_focus()
- returns a string
To be overloaded into derivated class
get_icon_url() - Get the url to display the icon for this anchor
function get_icon_url()
- returns an anchor to the icon image
Voir aussi:
get_neighbours() - Get next and previous items, if any
function get_neighbours($type, $item)
- $type - string the item type (eg, 'image', 'file', etc.)
- $item - array the anchored item asking for neighbours
- returns an array($previous_url, $previous_label, $next_url, $next_label, $option_url, $option_label)
Voir aussi:
get_path_bar() - Get the path bar for this anchor
function get_path_bar()
- returns an array of $url => $label
Voir aussi:
get_reference() - Get the reference for this anchor
function get_reference()
- returns 'file:<id>'
$anchor = get_anchor($file['anchor']);
$context['text'] .= '<input type="hidden" name="anchor" value="'.$anchor->get_reference().'" />';
Voir aussi:
get_thumbnail_url() - Get the url to display the thumbnail for this anchor
function get_thumbnail_url()
- returns an anchor to the thumbnail image
Voir aussi:
get_url() - Get the url to display the main page for this anchor
function get_url($action='view')
- $action='view' - string the targeted action ('view', 'print', 'edit', 'delete', ...)
- returns an anchor to the viewing script
Voir aussi:
load_by_id() - Load the related item
function load_by_id($id)
- $id -
Voir aussi:
touch() - Remember the last action for this file
function touch($action, $origin, $silently = FALSE)
- $action - string one of the pre-defined action code
- $origin - string the id of the item related to this update
- $silently = FALSE - boolean TRUE to not change the edit date of the file, default is FALSE
- returns string either a null string, or some text describing an error to be inserted into the html response
- On image creation, the adequate code is added to the description field to let the image be displayed inline
- On icon selection, the icon field is updated
- On thumbnail image selection, the thumbnail image field is updated
Moreover, on any change that impact the edition date (i.e., not in silent mode), a message is sent to the file creator, if different from the current surfer and a message is sent to watchers as well.
Voir aussi: