Class CFriendlyUrlController

Description

Abstract controller for inheritance of Friendly URL pages.

It contains initialization of CFriendlyUrlController::$furl (friendly URL data), tweaking CController::$pageTitle and view path. Also it contains rewrited CController::$createUrl method with support Friendly URL extension.

All controllers, that called with Friendly Url extension must be extends from CFriendlyUrlController.

Located in /CFriendlyUrlController.php (line 23)

CController
   |
   --CFriendlyUrlController
Variable Summary
stdObject $furl
Method Summary
CFriendlyUrlController __construct (string $id, [ $model = NULL])
void actionIndex ()
string createUrl ([string|integer $url = NULL], [array $params = array()], [integer $item = NULL], [string $action = ''])
stdObject getFurl ()
string getViewPath ()
Variables
array $actionTitles = array() (line 35)

Array of page names depending on current action.

Methods
Constructor __construct (line 51)

In addition to CContoller constructor setting up a $furl and CController::$pageTitle.

CFriendlyUrlController __construct (string $id, [ $model = NULL])
  • string $id: Id of this controller.
  • CWebModule $model: The module that this controller belongs to.
actionIndex (line 148)

Default action index with 404 http exception for security reasons.

void actionIndex ()
createUrl (line 105)

Creates a relative URL for the specified action defined in this controller.

string createUrl ([string|integer $url = NULL], [array $params = array()], [integer $item = NULL], [string $action = ''])
  • string|integer $url: The URL. This should be in the friendly URL format (simple beautiful URL, desirable without action), or an ID of page: uniqueID is negative, pageID is positive. If it is blank, use current $furl data.
  • array $params: Additional GET parameters.
  • integer $item: ID of element to action on it.
  • string $action: Action name to call.
getFurl (line 136)

Make $furl read-only variable.

stdObject getFurl ()
getViewPath (line 83)

Returns the directory containing view files for this controller.

Finding it in that way:

  • protected/views/ControllerID/PageCname'
  • protected/views/ControllerID'

string getViewPath ()

Documentation generated on Mon, 13 Apr 2009 16:55:47 +0400 by phpDocumentor 1.4.1