/** * * @return string Rendered string * @api */ public function render() { $string = $this->arguments['string']; if ($string === NULL) { $string = $this->renderChildren(); } return String::cutSuffix($string, $this->arguments['suffix']); }
public function saveRecipe($arguments) { $recipeClassName = String::classNameFromPath($arguments['recipe']); $recipe = new $recipeClassName(); chdir($arguments['path']); $recipe->saveFields($_POST); $this->redirect('recipe/' . $arguments['recipe'] . '/' . $arguments['path']); }
public function getUncachedControllersValue() { $value = array(); foreach ($this->facade->uncachedControllers as $controller => $actions) { foreach ($actions as $action) { $value[] = String::cutSuffix($controller, 'Controller') . ':' . String::cutSuffix($action, 'Action'); } } return implode(',', $value); }
public function getActions() { $actions = array(); foreach ($this->facade->getMethods() as $method) { if (!String::endsWith($method->getName(), 'Action')) { continue; } $actions[$method->getName()] = $method; } return $actions; }
/** * * @return string Rendered string * @api */ public function render() { if ($this->arguments['prefix'] !== NULL) { $this->pushPrefix($this->arguments['prefix']); $output = $this->renderChildren(); $this->popPrefix(); return $output; } $name = $this->getPrefix(); if ($this->arguments['name'] !== NULL) { $name .= '.' . $this->arguments['name']; } return String::pathToformName($name); }
public function getType() { return String::relativeClass(get_class($this)); }
public function save($fieldValues) { foreach ($fieldValues as $key => $value) { if (isset($this->data[$key])) { $this->data[$key] = $value; } } $output = sprintf('<?php /*************************************************************** * Extension Manager/Repository config file for ext: "%s" * * Auto generated by famelo/soup %s * * Manual updates: * Only the data in the array - anything else is removed by next write. * "version" and "dependencies" must not be touched! ***************************************************************/ $EM_CONF[$_EXTKEY] = %s;', basename(WORKING_DIRECTORY), date('Y-m-d'), var_export($this->data, TRUE)); file_put_contents('ext_emconf.php', $output); $namespace = ''; if (!empty($fieldValues['company'])) { $namespace = $fieldValues['company'] . '\\'; } $namespace .= String::underscoreToCamelcase($fieldValues['extension_key']) . '\\'; $this->composer->setNamespace($namespace, 'Classes/'); $this->composer->save(); }
public function getType() { return String::relativeClass('\\Famelo\\Soup\\TYPO3\\ExtensionRecipe'); }
public function getPrefix() { $path = trim(str_replace(array('Famelo\\Soup\\Ingredients', '\\'), array('', '-'), get_class($this)), '-') . '.' . $this->getId(); return String::pathToformName($path); }