Renaming of the WebPage class (and its derived classes) to stick to the same naming convention as other classes.

SVN:trunk[250]
This commit is contained in:
Denis Flaven
2010-01-17 09:07:10 +00:00
parent 7e35b6c371
commit 0a413a32f6
35 changed files with 116 additions and 116 deletions

View File

@@ -11,7 +11,7 @@ require_once("../application/webpage.class.inc.php");
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
*/
class ajax_page extends web_page
class ajax_page extends WebPage
{
/**
* Jquery style ready script

View File

@@ -116,7 +116,7 @@ abstract class cmdbAbstractObject extends CMDBObject
return $sDisplayValue;
}
function DisplayBareHeader(web_page $oPage)
function DisplayBareHeader(WebPage $oPage)
{
// Standard Header with name, actions menu and history block
//
@@ -140,12 +140,12 @@ abstract class cmdbAbstractObject extends CMDBObject
$oPage->add("</div>\n");
}
function DisplayBareDetails(web_page $oPage)
function DisplayBareDetails(WebPage $oPage)
{
$oPage->add($this->GetBareDetails($oPage));
}
function DisplayBareRelations(web_page $oPage)
function DisplayBareRelations(WebPage $oPage)
{
// Related objects
$oPage->AddTabContainer('Related Objects');
@@ -197,7 +197,7 @@ abstract class cmdbAbstractObject extends CMDBObject
return $sDisplayName;
}
function GetBareDetails(web_page $oPage)
function GetBareDetails(WebPage $oPage)
{
$sHtml = '';
$oAppContext = new ApplicationContext();
@@ -244,7 +244,7 @@ abstract class cmdbAbstractObject extends CMDBObject
}
function DisplayDetails(web_page $oPage)
function DisplayDetails(WebPage $oPage)
{
$sTemplate = Utils::ReadFromFile(MetaModel::GetDisplayTemplate(get_class($this)));
if (!empty($sTemplate))
@@ -262,7 +262,7 @@ abstract class cmdbAbstractObject extends CMDBObject
}
}
function DisplayPreview(web_page $oPage)
function DisplayPreview(WebPage $oPage)
{
$aDetails = array();
$sClass = get_class($this);
@@ -276,13 +276,13 @@ abstract class cmdbAbstractObject extends CMDBObject
// Comment by Rom: this helper may be used to display objects of class DBObject
// -> I am using this to display the changes history
public static function DisplaySet(web_page $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
public static function DisplaySet(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
$oPage->add(self::GetDisplaySet($oPage, $oSet, $aExtraParams));
}
//public static function GetDisplaySet(web_page $oPage, CMDBObjectSet $oSet, $sLinkageAttribute = '', $bDisplayMenu = true, $bSelectMode = false)
public static function GetDisplaySet(web_page $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
//public static function GetDisplaySet(WebPage $oPage, CMDBObjectSet $oSet, $sLinkageAttribute = '', $bDisplayMenu = true, $bSelectMode = false)
public static function GetDisplaySet(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
static $iListId = 0;
$iListId++;
@@ -418,7 +418,7 @@ abstract class cmdbAbstractObject extends CMDBObject
return $sHtml;
}
static function DisplaySetAsCSV(web_page $oPage, CMDBObjectSet $oSet, $aParams = array())
static function DisplaySetAsCSV(WebPage $oPage, CMDBObjectSet $oSet, $aParams = array())
{
$oPage->add(self::GetSetAsCSV($oSet, $aParams));
}
@@ -455,7 +455,7 @@ abstract class cmdbAbstractObject extends CMDBObject
return $sHtml;
}
static function DisplaySetAsXML(web_page $oPage, CMDBObjectSet $oSet, $aParams = array())
static function DisplaySetAsXML(WebPage $oPage, CMDBObjectSet $oSet, $aParams = array())
{
$oAppContext = new ApplicationContext();
$sClassName = $oSet->GetFilter()->GetClass();
@@ -480,7 +480,7 @@ abstract class cmdbAbstractObject extends CMDBObject
}
// By rom
function DisplayChangesLog(web_page $oPage)
function DisplayChangesLog(WebPage $oPage)
{
$oFltChangeOps = new CMDBSearchFilter('CMDBChangeOpSetAttribute');
$oFltChangeOps->AddCondition('objkey', $this->GetKey(), '=');
@@ -498,13 +498,13 @@ abstract class cmdbAbstractObject extends CMDBObject
}
}
public static function DisplaySearchForm(web_page $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
public static function DisplaySearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
$oPage->add(self::GetSearchForm($oPage, $oSet, $aExtraParams));
}
public static function GetSearchForm(web_page $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
public static function GetSearchForm(WebPage $oPage, CMDBObjectSet $oSet, $aExtraParams = array())
{
static $iSearchFormId = 0;
$oAppContext = new ApplicationContext();
@@ -755,7 +755,7 @@ abstract class cmdbAbstractObject extends CMDBObject
return $sHTMLValue;
}
public function DisplayModifyForm(web_page $oPage)
public function DisplayModifyForm(WebPage $oPage)
{
static $iFormId = 0;
$iFormId++;
@@ -812,7 +812,7 @@ abstract class cmdbAbstractObject extends CMDBObject
$oPage->add("</form>\n");
}
public static function DisplayCreationForm(web_page $oPage, $sClass, $oObjectToClone = null, $aArgs = array())
public static function DisplayCreationForm(WebPage $oPage, $sClass, $oObjectToClone = null, $aArgs = array())
{
static $iCreationFormId = 0;

View File

@@ -4,7 +4,7 @@ require_once("../application/webpage.class.inc.php");
* Simple web page with no includes or fancy formatting, useful to generateXML documents
* The page adds the content-type text/XML and the encoding into the headers
*/
class CSVPage extends web_page
class CSVPage extends WebPage
{
function __construct($s_title)
{

View File

@@ -149,7 +149,7 @@ class DisplayBlock
return new $sBlockClass($oFilter, $sBlockType, $bAsynchronous, $aParams);
}
public function Display(web_page $oPage, $sId, $aExtraParams = array())
public function Display(WebPage $oPage, $sId, $aExtraParams = array())
{
$oPage->add($this->GetDisplay($oPage, $sId, $aExtraParams));
/*
@@ -184,7 +184,7 @@ class DisplayBlock
*/
}
public function GetDisplay(web_page $oPage, $sId, $aExtraParams = array())
public function GetDisplay(WebPage $oPage, $sId, $aExtraParams = array())
{
$sHtml = '';
$aExtraParams = array_merge($aExtraParams, $this->m_aParams);
@@ -220,12 +220,12 @@ class DisplayBlock
return $sHtml;
}
public function RenderContent(web_page $oPage, $aExtraParams = array())
public function RenderContent(WebPage $oPage, $aExtraParams = array())
{
$oPage->add($this->GetRenderContent($oPage, $aExtraParams));
}
public function GetRenderContent(web_page $oPage, $aExtraParams = array())
public function GetRenderContent(WebPage $oPage, $aExtraParams = array())
{
$sHtml = '';
// Add the extra params into the filter if they make sense for such a filter
@@ -615,7 +615,7 @@ class DisplayBlock
*/
class HistoryBlock extends DisplayBlock
{
public function GetRenderContent(web_page $oPage, $aExtraParams = array())
public function GetRenderContent(WebPage $oPage, $aExtraParams = array())
{
$sHtml = '';
// Add the extra params into the filter if they make sense for such a filter
@@ -689,7 +689,7 @@ class HistoryBlock extends DisplayBlock
class MenuBlock extends DisplayBlock
{
public function GetRenderContent(web_page $oPage, $aExtraParams = array())
public function GetRenderContent(WebPage $oPage, $aExtraParams = array())
{
$sHtml = '';
$oAppContext = new ApplicationContext();

View File

@@ -3,7 +3,7 @@ require_once("../application/nicewebpage.class.inc.php");
/**
* Web page used for displaying the login form
*/
class login_web_page extends nice_web_page
class LoginWebPage extends NiceWebPage
{
public function __construct()
{
@@ -96,7 +96,7 @@ h1 {
}
else
{
$oPage = new login_web_page();
$oPage = new LoginWebPage();
$oPage->DisplayLoginForm();
$oPage->output();
exit;
@@ -110,7 +110,7 @@ h1 {
if (!UserRights::Login($sAuthUser, $sAuthPwd))
{
self::ResetSession();
$oPage = new login_web_page();
$oPage = new LoginWebPage();
$oPage->DisplayLoginForm( true /* failed attempt */);
$oPage->output();
exit;

View File

@@ -113,7 +113,7 @@ class menuNode extends DBObject
return $oSet;
}
public function RenderContent(web_page $oPage, $aExtraParams = array())
public function RenderContent(WebPage $oPage, $aExtraParams = array())
{
$sTemplate = $this->Get('template');
$oTemplate = new DisplayTemplate($sTemplate);
@@ -136,7 +136,7 @@ class menuNode extends DBObject
}
$oP->AddToMenu("</li>\n");
}
static public function DisplayCreationForm(web_page $oP, $sClass, $sFilter, $aExtraParams = array())
static public function DisplayCreationForm(WebPage $oP, $sClass, $sFilter, $aExtraParams = array())
{
$oFilter = DBObjectSearch::unserialize($sFilter);
$oP->p('Create a new menu item for: '.$oFilter->__DescribeHTML());

View File

@@ -3,7 +3,7 @@ require_once("../application/webpage.class.inc.php");
/**
* Web page with some associated CSS and scripts (jquery) for a fancier display
*/
class nice_web_page extends web_page
class NiceWebPage extends WebPage
{
var $m_aReadyScripts;

View File

@@ -15,7 +15,7 @@ class DisplayTemplate
$this->m_sTemplate = $sTemplate;
}
public function Render(web_page $oPage, $aParams = array())
public function Render(WebPage $oPage, $aParams = array())
{
$this->m_sTemplate = MetaModel::ApplyParams($this->m_sTemplate, $aParams);
$iStart = 0;

View File

@@ -17,7 +17,7 @@ class UILinksWidget
$this->m_iInputId = $iInputId;
}
public function Display(web_page $oPage, $oCurrentValuesSet = null)
public function Display(WebPage $oPage, $oCurrentValuesSet = null)
{
$sHTMLValue = '';
$sTargetClass = self::GetTargetClass($this->m_sClass, $this->m_sAttCode);
@@ -122,7 +122,7 @@ class UILinksWidget
}
/**
* This static function is called by the Ajax Page when there is a need to fill an autocomplete combo
* @param $oPage web_page The ajax page used for the put^put (sent back to the browser
* @param $oPage WebPage The ajax page used for the put^put (sent back to the browser
* @param $oContext UserContext The context of the user (for limiting the search)
* @param $sClass string The name of the class of the current object being edited
* @param $sAttCode string The name of the attribute being edited
@@ -130,7 +130,7 @@ class UILinksWidget
* @param $iMaxCount integer The maximum number of items to return
* @return void
*/
static public function Autocomplete(web_page $oPage, UserContext $oContext, $sClass, $sAttCode, $sName, $iMaxCount)
static public function Autocomplete(WebPage $oPage, UserContext $oContext, $sClass, $sAttCode, $sName, $iMaxCount)
{
// #@# todo - add context information, otherwise any value will be authorized for external keys
$aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, array() /* $aArgs */, $sName);
@@ -166,7 +166,7 @@ class UILinksWidget
/**
* This static function is called by the Ajax Page display a set of objects being linked
* to the object being created
* @param $oPage web_page The ajax page used for the put^put (sent back to the browser
* @param $oPage WebPage The ajax page used for the put^put (sent back to the browser
* @param $sClass string The name of the 'linking class' which is the class of the objects to display
* @param $sSet JSON serialized set of objects
* @param $sExtKeyToMe Name of the attribute in sClass that is pointing to a given object

View File

@@ -55,7 +55,7 @@ class UILinksWizard
}
}
public function Display(web_page $oP, UserContext $oContext, $aExtraParams = array())
public function Display(WebPage $oP, UserContext $oContext, $aExtraParams = array())
{
$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sLinkageAttr);
$sTargetClass = $oAttDef->GetTargetClass();
@@ -295,7 +295,7 @@ class UILinksWizard
return $aRow;
}
protected function DisplayFormTable(web_page $oP, $aConfig, $aData)
protected function DisplayFormTable(WebPage $oP, $aConfig, $aData)
{
$oP->add("<table class=\"listResults\">\n");
// Header
@@ -327,7 +327,7 @@ class UILinksWizard
$oP->add("</table>\n");
}
protected function DisplayFormRow(web_page $oP, $aConfig, $aRow, $iRowId)
protected function DisplayFormRow(WebPage $oP, $aConfig, $aRow, $iRowId)
{
$oP->add("<tr id=\"row_$iRowId\">\n");
foreach($aConfig as $sName=>$void)
@@ -337,7 +337,7 @@ class UILinksWizard
$oP->add("</tr>\n");
}
public function DisplayAddForm(web_page $oP, UserContext $oContext)
public function DisplayAddForm(WebPage $oP, UserContext $oContext)
{
$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sLinkageAttr);
$sTargetClass = $oAttDef->GetTargetClass();
@@ -361,7 +361,7 @@ class UILinksWizard
$oP->add_ready_script("$('div#SearchFormToAdd form').bind('submit', function() {var the_form = this; SearchObjectsToAdd(the_form.id); return false;});");
}
public function SearchObjectsToAdd(web_page $oP, UserContext $oContext)
public function SearchObjectsToAdd(WebPage $oP, UserContext $oContext)
{
//$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sLinkageAttr);
@@ -371,7 +371,7 @@ class UILinksWizard
$oBlock->Display($oP, 'ResultsToAdd', array('menu' => false, 'selection_mode' => true, 'display_limit' => false)); // Don't display the 'Actions' menu on the results
}
public function DoAddObjects(web_page $oP, UserContext $oContext, $aLinkedObjectIds = array())
public function DoAddObjects(WebPage $oP, UserContext $oContext, $aLinkedObjectIds = array())
{
//$oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $this->m_sLinkageAttr);
//$sTargetClass = $oAttDef->GetTargetClass();

View File

@@ -6,11 +6,11 @@
* and renders the full web page by putting the elements in the proper place & order
* when the output() method is called.
* Usage:
* $oPage = new web_page("Title of my page");
* $oPage = new WebPage("Title of my page");
* $oPage->p("Hello World !");
* $oPage->output();
*/
class web_page
class WebPage
{
protected $s_title;
protected $s_content;

View File

@@ -4,7 +4,7 @@ require_once("../application/webpage.class.inc.php");
* Simple web page with no includes or fancy formatting, useful to generateXML documents
* The page adds the content-type text/XML and the encoding into the headers
*/
class XMLPage extends web_page
class XMLPage extends WebPage
{
function __construct($s_title)
{