Search Results (1 - 10 of 10)
The CakePHP console
...plications much smoother. The CakePHP console provides a framework for creating shell scripts. The console uses a dispatcher-type setup to lo... ... on the system if you plan to use the console. Before we get into specifics, le... ...’s make sure we can run the CakePHP console. First, you’ll need to bring up a sy... ... will be in bash, but the CakePHP console is Windows-compatible as well. Le
Running Shells as cronjobs
...tters. However, when you have added the console path to the PATH variable via ~/... ... do if [ "$1" = "-cli" ] || [ "$1" = "-console" ]; then PATH=$PATH:$2 shif... ...akeshell myshell myparam -cli /usr/bin -console /cakes/1.2.x.x/cake/console The -cli parameter takes a path... ...ints to the php cli executable and the -console parameter takes a path which points to the CakePHP console.
Multiple Translation Tables
...l with the one generated by the CakePHP console script. To make sure it fits one... ...nitialize an empty i18n table using the console and rename the table afterwards.
Modify default HTML produced by "baked" templates
... baking custom views: Go into: cake/console/libs/templates/views Notice t... ...king custom projects: Go into: cake/console/libs/templates/skel Notice the base application files there Copy them to your: app/vendors/shells/templates/skel Make changes to the HTML output to control the way "bake" builds your views Pass the skeleton path parameter to the project task
Code Generation with Bake
...ome bare classes. CakePHP’s Bake console is another effort to get you up ... ...ning in CakePHP – fast. The Bake console can create any of CakePHP’... ... or call it using ./cake bake. The cake console is run using the PHP CLI (command line interface). If you have problems running the script, ensure that you have the PHP CLI installed and that it has the proper modules enabl
Creating Your Own Shells
Let's create a shell for use in the console. For this example, we'll create... ...llo user, Welcome to CakePHP v1.2 console --------------------------------------------------------------- App : app Path: /path/to/cake/app --------------------------------------------------------------- Order date: 2007-07-30 10:31:12 Amount: $42.78 ------------------------------
Localization in CakePHP
...field, __($value, true)); } The i18n console task will not be able to determine... ...o(t) file every time you run the i18n console task, you can use a different domain such as: function invalidate($field, $value = true) { return parent::invalidate($field, __d('validation_errors', $value, true)); } This will look for $value in the validation_errors.po file. There's one other aspect of local
Internationalizing Your Application
...(s), all you need to do is run the i18n console task, which will look for where ... ...for you. You can and should re-run this console task any time you change the translations in your code. The pot file(s) themselves are not used by CakePHP, they are the templates used to create or update your po files, which contain the translations. Cake will look for your po files in the following location:
Scaffolding
...ite some code. CakePHP’s Bake console, covered in the next section, is a great next step: it generates all the code that would produce the same result as the most current scaffold. Scaffolding is a great way of getting the early parts of developing a web application started. Early database schemas are subject to change, which is perfectly normal in the early part of the design process. This ha
Creating Access Request Objects (AROs) and Access Control Objects (ACOs)
...e got them in there, we can use the ACL console application to verify the tree s... ...nstration purposes. The output of that console application command should now be a little more interesting. Let's give it a try: $ cake acl view aro Aro tree: --------------------------------------------------------------- [1]warriors [5]Aragorn [6]Legolas [7]Gimli [2]wizards [8]G
Page 1 of 1

