Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cGuiBackendHelpbox
  • cGuiFileOverview
  • cGuiFoldingRow
  • cGuiList
  • cGuiMenu
  • cGuiNavigation
  • cGuiNotification
  • cGuiObjectPager
  • cGuiPage
  • cGuiScrollList
  • cGuiSourceEditor
  • cGuiTableForm
  • cGuiTree
  • cPager
  • cTemplate
  • cTree
  • cTreeItem
  • NoteLink
  • NoteList
  • NoteListItem
  • NoteView
  • TODOLink
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cGuiFileOverview

The class cGuiFileOverview is a cGuiPage displaying files. It is meant to be used but in the left bottom frame. As for now it is used to display HTML, CSS & JS files.

<strong>Usage</strong>

// path to directory where files to display are located
$path = $cfgClient[$client]['tpl']['path'];
// basename of file to mark as selected
$mark = stripslashes($_REQUEST['file']);
// build page to display files
$page = new cGuiFileOverview($path, $mark, 'html');
// optionally set extension(s) to filter files
$page->setFileExtension(array('html', 'tpl'));
// render page
$page->render();

<strong>Directory</strong> Only files in the directory defined by the given path are displayed.

<strong>Extension</strong> If set via setFileExtension(array) only files of the given extensions are displayed. By default all extensions are considered.

<strong>Order of files</strong> The files to be displayed are sorted alphabetically.

<strong>Marking files</strong> When initializing the class the name of a file to mark can be given. This feature is totally optional.

<strong>Additional file information</strong> When initializing the class the name of a file information type to display can be given. This feature is totally optional.

cGuiPage
Extended by cGuiFileOverview
Package: Core\GUI
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Mischa Holz
Todo: This feature does not work at the moment. <strong>Template</strong> This class is bound to the template generic_file_overview in a hardcoded manner (template,generic_file_overview.html).
Todo: This prevents this class to be used with other views. <strong>Editing a file</strong> When editing a file
  • the right top frame is opened with the URL: main.php ?area={AREA} &frame=3 &file={FILENAME} &contenido=1
  • whereas the right bottom frame is opened with the URL: main.php ?area={AREA} &frame=4 &action={ACTION} &file={FILENAME} &tmp_file={FILENAME} &contenido=1
AREA & ACTION are filled with the current global values. FILENAME is the name of the current file.
Todo: Why the parameter contenido is set to 1 is to be clarified. IMHO it should be the current value of the global contenido variable.
Todo: Why the parameter file and tmp_file are both set is to be clarified. <strong>Deleting a file</strong> A delete icon is provided for each file. When deleting a file
  • the right bottom frame is opened with the URL: main.php ?area={AREA} &action={ACTION} &frame=4 &delfile={FILENAME}

Todo: Why the parameter contenido is not set is to be clarified.
Todo: Why the URL is generated via JS is to be clarified. If the effective setting client/readonly is "true" or the current user has no privileges for the action $area . "_delete" of the current area this icon will be inactive though.
Todo: This prevents this class to be used in other areas.
Located at classes/gui/class.fileoverview.php
Methods summary
public
# __construct( string $dir, string $markedFile = '', string $fileInfoType = '' )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Initializes the class for the directory.

Parameters

$dir
string
$dir path to the directory directory where files to display are located
$markedFile
string
$markedFile [optional] basename of file that will be marked as selected.
$fileInfoType
string
$fileInfoType [optional] type of additional file information that should be displayed as description

Overrides

cGuiPage::__construct()
public
# setFileExtension( array|string $extension )

Sets extension(s) to filter files that should be displayed.

Sets extension(s) to filter files that should be displayed.

Parameters

$extension
array|string
$extension Name of extensions
public string|
# render( cTemplate|null $template = NULL, boolean $return = false )

Renders the page

Renders the page

Parameters

$template
cTemplate|null
$template
$return
boolean
$return

Returns

string|

Throws

cDbException
cException
cInvalidArgumentException

Overrides

cGuiPage::render()
Methods inherited from cGuiPage
_getRealFilePathName(), _renderContentMessages(), _renderMetaTags(), _renderObjects(), _renderScripts(), _renderStyles(), _renderTemplate(), abortRendering(), addBodyClassName(), addMeta(), addScript(), addStyle(), appendContent(), displayCriticalError(), displayError(), displayInfo(), displayOk(), displayWarning(), next(), reloadFrame(), set(), setContent(), setEncoding(), setMarkScript(), setPageBase(), setReload(), setSubnav()
Properties summary
protected string $_directory
#

Path to the directory directory where files to display are located.

Path to the directory directory where files to display are located.

protected string $_markedFile
#

Basename of file that will be marked as selected.

Basename of file that will be marked as selected.

protected string $_fileInfoType
#

Type of additional file information that should be displayed as description.

Type of additional file information that should be displayed as description.

protected string $_fileExtension
#

Selected file extension.

Selected file extension.

Properties inherited from cGuiPage
$_abort, $_bodyClassNames, $_contentTemplate, $_error, $_filesDirectory, $_info, $_markScript, $_metaTags, $_objects, $_ok, $_pageBase, $_pageName, $_pageTemplate, $_pluginName, $_scripts, $_skipTemplateCheck, $_styles, $_subnav, $_warning
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0