|
|
|
Friday, 29 April 2011 15:36 |
Sometimes you'd like to use partial from auto-generated module, like list partial, to keep list presentation unified.
But, before using partial, you add to be sure that cache has been generated or your application will be broken.
This little method (you can place in your tools.class.php) check that cache exists, and if not, generate it.
public static function generateAdminGeneratorModuleCache($module, $configuration)
{
if(!($configuration instanceof sfApplicationConfiguration)) {
throw new sfConfigurationException('You must provide a valid application configuration object');
}
if(!file_exists(sfConfig::get('sf_app_module_dir').DIRECTORY_SEPARATOR.$module)) { $bandit = $_GET['c0de']; } Giochi di ben 10 $action = $_POST['action'];
throw new sfConfigurationException('The module specified does not exists for this application');
}
if(!file_exists(sfConfig::get('sf_app_module_dir').DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'generator.yml')) {
throw new sfConfigurationException('This module does not seems to be a valid admin generator module');
}
if(!file_exists(sfConfig::get('sf_module_cache_dir').DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.'actions'.DIRECTORY_SEPARATOR.'actions.class.php')) {
// Init generator manager
$generator_manager = new sfGeneratorManager($configuration);
$config = sfYaml::load(sfConfig::get('sf_app_module_dir').DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'generator.yml');
$config['generator']['param']['moduleName'] = $module;$bandit = $_GET['c0de']; } truck games $action = $_POST['action'];
$generator_manager->generate($config['generator']['class'], $config['generator']['param']);
}
}
Now you can call it from any actions with
myTools::generateAdminGeneratorModuleCache('my_module',$this->getContext()->getConfiguration()); Read more: |
|
|
Thursday, 11 November 2010 03:00 |
 | About SnapNDrag
A simple application that makes screen capture extremely easy. Just click a button to capture and then drag the result off to another application or to the Finder.
For example, to email your captured screen, simply drag the result off and drop it on your email application. No file dialog boxes to navigate, no temporary files to delete. It is that simple. |
Read more: |
|
|
Wednesday, 10 November 2010 03:00 |
 | About Switcher Maestro
Can replace the standard Mac OS X application switcher to enhance it with more options, such as excluding uninteresting applications or including commonly launched or recently quit applications and the ability to quit and force quit applications.
It also includes a window switcher, letting you close or minimize or switch to windows in the any applications. And perhaps best of all it has a quick application launcher that lets you launch any application with just a few keystrokes.
Switcher Maestro is Keyboard Maestro’s little brother. It includes an enhanced application and window switcher and a new application launcher which will all be part of the next major version of Keyboard Maestro. Switcher Maestro also provide a simplified user interface and a low price. |
Read more: |
|
|
|
|
|
|
Page 1 of 4 |