NewsFeaturesDownloadsDevelopmentSupportAbout Us

AdminAddLocaleAction Class Reference
[Action]

Inherits SiteAdminAction.

List of all members.


Public Member Functions

 AdminAddLocaleAction ($actionInfo, $request)
 validate ()
 _performUploadLocale ()
 perform ()

Private Member Functions

 _performScanLocales ()

Detailed Description

Takes care of adding new locales to the system

Definition at line 16 of file adminaddlocaleaction.class.php.


Member Function Documentation

AdminAddLocaleAction.AdminAddLocaleAction ( actionInfo,
request 
)

Definition at line 19 of file adminaddlocaleaction.class.php.

References $request, and SiteAdminAction.SiteAdminAction().

AdminAddLocaleAction.validate (  ) 

This method can be used for data validation and is always executed before perform(). If it returns 'true', execution will continue as normal. If it returns 'false', the process will be stopped and the current contents of the view will be returned. If the view is empty, an exception will be thrown.

As of pLog 1.0, it is not necessary to implement data validation code here and it is recommended to use the data validation framework (see methods Action.registerFieldValidator() and related) There is more information about the data validation framework in the wiki: http://wiki.plogworld.net/index.php/PLog_1.0/Forms_and_data_validation.

With the default code provided in the Action.validate() method, the callback method Action.validationErrorProcessing() will be called and after that, the view set via the Action.setValidationErrorView() will be used to generate the contents of the error message.

Returns:
Returns true if data is correct or false otherwise. See above for more details.

Reimplemented from Action.

Definition at line 30 of file adminaddlocaleaction.class.php.

References HttpVars.getFiles(), Locales.isValidLocaleFileName(), and AdminAction.setCommonData().

AdminAddLocaleAction._performScanLocales (  )  [private]

scans the locale folder looking for new locales

Returns:
always true

Definition at line 55 of file adminaddlocaleaction.class.php.

Referenced by perform().

AdminAddLocaleAction._performUploadLocale (  ) 

Definition at line 88 of file adminaddlocaleaction.class.php.

References $result, and HttpVars.getFiles().

Referenced by perform().

AdminAddLocaleAction.perform (  ) 

Receives the HTTP request from the client as parameter, so that we can extract the parameters and perform our business logic.

The result of this will be a view, which will normally be the output of the processing we just did or for example an error view showing an error message. Once we have completed processing, the controller will call the getView() method to get the resulting view and send it back to the customer.

Returns:
Returns nothing

Reimplemented from Action.

Definition at line 120 of file adminaddlocaleaction.class.php.

References $result, _performScanLocales(), _performUploadLocale(), and AdminAction.setCommonData().