本文整理汇总了PHP中F0FController::execute方法的典型用法代码示例。如果您正苦于以下问题:PHP F0FController::execute方法的具体用法?PHP F0FController::execute怎么用?PHP F0FController::execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类F0FController
的用法示例。
在下文中一共展示了F0FController::execute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute($task)
{
if (!in_array($task, array('switchprofile', 'disablephpwarning', 'updateinfo', 'applydlid', 'resetSecretWord'))) {
$task = 'browse';
}
parent::execute($task);
}
示例2: execute
public function execute($task)
{
if (!in_array($task, array('protect', 'unprotect'))) {
$task = 'browse';
}
parent::execute($task);
}
示例3: execute
public function execute($task)
{
if (!in_array($task, array('save', 'cancel', 'downloaddat'))) {
$task = 'browse';
}
parent::execute($task);
}
示例4: execute
public function execute($task)
{
if ($task != 'step') {
$task = 'browse';
}
parent::execute($task);
}
示例5: execute
public function execute($task)
{
if (!in_array($task, array('browse', 'hide2copromo', 'wizardstep', 'updateinfo'))) {
$task = 'browse';
}
parent::execute($task);
}
示例6: execute
public function execute($task)
{
if (!in_array($task, array('purgesessions'))) {
$task = 'browse';
}
parent::execute($task);
}
示例7: execute
function execute($task)
{
if (in_array($task, array('add', 'edit', 'read', 'browse'))) {
$task = 'browse';
}
return parent::execute($task);
}
示例8: execute
public function execute($task)
{
if (!in_array($task, array('savedefaults', 'saveperms', 'saveapplyperms'))) {
$task = 'browse';
}
$this->getThisModel()->setState('task', $task);
parent::execute($task);
}
示例9: execute
public function execute($task)
{
if (!in_array($task, array('read', 'cancel'))) {
$task = 'read';
$this->input->set('task', 'read');
}
parent::execute($task);
}
示例10: execute
/**
* Executes a given controller task. The onBefore<task> and onAfter<task>
* methods are called automatically if they exist.
*
* @param string $task The task to execute, e.g. "browse"
*
* @throws Exception Exception thrown if the onBefore<task> returns false
*
* @return null|bool False on execution failure
*/
public function execute($task)
{
$validTasks = array('force', 'overview', 'startupdate', 'download', 'extract', 'install', 'cleanup');
if (!in_array($task, $validTasks)) {
$task = 'overview';
}
return parent::execute($task);
}
示例11: execute
/**
* Overridden task dispatcher to whitelist specific tasks
*
* @param string $task The task to execute
*
* @return bool|null|void
*/
public function execute($task)
{
// We only allow specific tasks. If none matches, assume the user meant the "browse" task
if (!in_array($task, array('step'))) {
$task = 'show';
}
$this->task = $task;
parent::execute($task);
}
示例12: execute
/**
* Overridden task dispatcher to whitelist specific tasks
*
* @param string $task The task to execute
*
* @return bool|null|void
*/
public function execute($task)
{
// Preload the model class of this view (we have a problem with the name, you know)
$cpanelModel = $this->getModel('Cpanel', 'AdmintoolsModel');
// We only allow specific tasks. If none matches, assume the user meant the "browse" task
if (!in_array($task, array('login', 'updategeoip', 'updateinfo', 'fastcheck', 'selfblocked', 'unblockme', 'applydlid', 'resetSecretWord'))) {
$task = 'browse';
}
$this->task = $task;
parent::execute($task);
}
示例13: execute
public function execute($task)
{
// Only task browse and save are valid
$allowedTasks = array('browse', 'save');
// Take browse as the default task
if (!in_array($task, $allowedTasks)) {
$task = 'browse';
}
$this->input->set('task', $task, $this->input);
parent::execute($task);
}
示例14: execute
public function execute($task)
{
$allowedTasks = array('browse', 'read', 'save');
if (in_array($task, array('edit', 'add'))) {
$task = 'read';
}
if (!in_array($task, $allowedTasks)) {
return false;
}
$this->input->set('task', $task);
return parent::execute($task);
}
示例15: execute
public function execute($task)
{
$app = JFactory::getApplication();
$appTask = $app->input->getCmd('appTask', '');
$values = $app->input->getArray($_POST);
// Check if we are in a report method view. If it is so,
// Try lo load the report plugin controller (if any)
if ($task == "view" && $appTask != '') {
$model = $this->getModel('Apps');
$id = $app->input->getInt('id', '0');
if (!$id) {
parent::execute($task);
}
$model->setId($id);
// get the data
// not using getItem here to enable ->checkout (which requires JTable object)
$row = $model->getTable();
$row->load((int) $model->getId());
$element = $row->element;
// The name of the App Controller should be the same of the $_element name,
// without the tool_ prefix and with the first letter Uppercase, and should
// be placed into a controller.php file inside the root of the plugin
// Ex: tool_standard => J2StoreControllerToolStandard in tool_standard/controller.php
$controllerName = str_ireplace('app_', '', $element);
$controllerName = ucfirst($controllerName);
$path = JPATH_SITE . '/plugins/j2store/';
$controllerPath = $path . $element . '/' . $element . '/controller.php';
if (file_exists($controllerPath)) {
require_once $controllerPath;
} else {
$controllerName = '';
}
$className = 'J2StoreControllerApp' . $controllerName;
if ($controllerName != '' && class_exists($className)) {
// Create the controller
$controller = new $className();
// Add the view Path
$controller->addViewPath($path);
// Perform the requested task
$controller->execute($appTask);
// Redirect if set by the controller
$controller->redirect();
} else {
parent::execute($task);
}
} else {
parent::execute($task);
}
}