Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • EncryptAllPasswordsTask
  • i18nTextCollectorTask
  • MigrateSiteTreeLinkingTask
  • MigrateTranslatableTask
  • UpgradeSiteTreePermissionSchemaTask
 1 <?php
 2 /**
 3  * @package sapphire
 4  * @subpackage tasks
 5  */
 6 class i18nTextCollectorTask extends BuildTask {
 7     
 8     protected $title = "i18n Textcollector Task";
 9     
10     protected $description = "
11         Traverses through files in order to collect the 'entity master tables'
12         stored in each module.
13     ";
14     
15     function init() {
16         parent::init();
17         
18         $canAccess = (Director::isDev() || Director::is_cli() || Permission::check("ADMIN"));
19         if(!$canAccess) return Security::permissionFailure($this);
20     }
21     
22     /**
23      * This is the main method to build the master string tables with the original strings.
24      * It will search for existent modules that use the i18n feature, parse the _t() calls
25      * and write the resultant files in the lang folder of each module.
26      * 
27      * @uses DataObject->collectI18nStatics()
28      */ 
29     public function run($request) {
30         increase_time_limit_to();
31         $locale = ($request->getVar('locale')) ? $request->getVar('locale') : null;
32         $c = new i18nTextCollector($locale);
33         $restrictModules = ($request->getVar('module')) ? explode(',', $request->getVar('module')) : null;
34         return $c->run($restrictModules);
35     }
36 }
37 ?>
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0