#app_customize you can customize the action hook
502090
@Override
    public ActionResponse hookBefore(final ActionRuntime runtime) { // application may override
        return viewHelper.getActionHook().hookBefore(runtime, r -> super.hookBefore(r));
    }
752072
function appendAttrsKeysOnly(action, attrs, updates, opts) {
  if (typeof attrs === "string" || attrs instanceof String)
    attrs = attrs.split(",");
  
  if (attrs && isArray(attrs)) {
    for(var i = 0; i < attrs.length; i++) {
      var key = attrs[i];
      if (key && isStr(key)  && key.length > 0)
        appendAttr(action, key.trim(), null, updates, opts);
    }
  }
  return updates;
}
1149992
public void customizeListForm(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, ModelListForm modelListForm)
			throws Exception {

	}
580002
function addHook(hooks, hook) {
    hooks.push(hook)
    return function () {
      var i = hooks.indexOf(hook)
      if (i >= 0) return hooks.splice(i, 1)
    }
  }
1150686
public function appAction() {
        $name = ucfirst($this->getFirstParamOrAsk('Enter application\'s name'));;
        FSService::makeWritable(DC::getEnvironment()->getApplicationRoot() . $name);
        $this->createCV(array(
            'name' => 'Index',
            'app'  => $name,
        ));
        $appPath = DC::getEnvironment()->getApplicationRoot() . $name . '/';
        $this->safeCreateFromTemplate($appPath . 'Views/_layout.slot', '_view_layout', array('app'=>$name));
        $this->safeCreateFromTemplate($appPath . 'config.yml', '_app_config', array('app'=>$name));
        $config = DC::getProjectConfig();
        if (!$config->has('applications/'.strtolower($name))) {
            $config->set('applications/'.strtolower($name), strtolower($name));
            $this->notify('added information to project.yml', '+ config');
            $config->save();
        }
    }
980639
public function doAction(string $hook, ...$args)
    {
        do_action($this->App->Config->©brand['©var'].'_'.$hook, ...$args);
    }
535948
public function hooks()
    {
        $this->hook->action(
            'show_user_profile',
            [$this->profile, 'fill']
        )->dispatch();

        $this->hook->action(
            'edit_user_profile',
            [$this->profile, 'fill']
        )->dispatch();

        $this->hook->action(
            'personal_options_update',
            [$this->profile, 'save']
        )->dispatch();

        $this->hook->action(
            'edit_user_profile_update',
            [$this->profile, 'save']
        )->dispatch();
    }
640954
def trigger_hook(self, __name, *args, **kwargs):
        '''  '''
        return [hook(*args, **kwargs) for hook in self._hooks[__name][:]]
848200
protected function defineActivationHooks(): void {
		$backend = $this->getBackend();
		$pluginName = $this->getFilename();
		$handlers = ["activate", "deactivate", "uninstall"];
		foreach ($handlers as $handler) {
			
			// for each of our handlers, we hook an action handler to our
			// backend component.  the purpose of the BackendInterface is
			// to guarantee that we have three methods, one for each of
			// these hooks.
			
			$hook = $handler . "_" . $pluginName;
			$this->loader->addAction($hook, $backend, $handler);
		}
	}
322060
function controllerWrap(ctx, ctrl, hooks, next) {
  let result
  const preHooks = []
  hooks.pre.map(pre => {
    preHooks.push(() => pre(ctx))
  })

  return sequenceAndReturnOne(preHooks)
    .then(() => {
      return ctrl(ctx)
    })
    .then(data => {
      if (!data && ctx.body && ctx.body.data) {
        data = ctx.body.data
      }
      result = data
      const postHooks = []
      hooks.post.map(post => {
        // Use pre action's result for next action's data
        postHooks.push(preResult => post(ctx, preResult || result))
      })
      return sequenceAndReturnOne(postHooks)
    })
    .then(ret => {
      if (!ctx.body) {
        ctx.body = {
          code: 0,
          data: ret || result
        }
      }
      next && next()
    })
    .catch(err => {
      // throw errors to app error handler
      throw err
    })
}
1355757
function customize () {
  var q1 = {
    name: 'title',
    message: 'What is your scene\'s title? (e.g., Forest Scene)',
    type: 'input',
    default: 'aframe-boilerplate'
  };

  var q2 = {
    name: 'handControls',
    message: 'Do you want tracked controls with hand models?',
    type: 'confirm',
    default: false
  };

  // Go.
  return new Promise(function (resolve) {
    inquirer.prompt([q1, q2]).then(function (answers) {
      // Slugify.
      answers.shortTitle = answers.title.toLowerCase().replace(/\s+/g, '-'
);
      run(answers)
      resolve(answers.shortTitle);
    });
  });

  /**
   * Do all the string replacements.
   */
  function run (answers) {
    answers.aframeVersion = aframeVersion;
    ls(['index.html', 'package.json', 'README.md']).forEach(function (file) {
      fs.writeFileSync(file, nunjucks.render(file, answers));
    });
  }
}
81836
def run_hook(hook_name, *args, &block)
      hooks.find {|hook| hook.name == hook_name }.run(self, *args, &block)
    end
445363
protected function addActions ()
    {
        add_action(Hooks::ADMIN_MENU, array($this, 'addPage'));
        if ($this->currentlyOnPage()) {
            add_action(Hooks::ADMIN_INIT, [$this, 'adminInit']);
        }
    }
126549
public function addAction(string $hook, callable $callable, ...$args)
    {
        return add_action($this->App->Config->©brand['©var'].'_'.$hook, $callable, ...$args);
    }
314236
function ProcessApplicationData($Appname) {
        $ApplicationControllers = DirectoryManager::GetFileNames(
                        "APP_ROOT_DIR" .
                        \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName .
                        $Appname .
                        \Puzzlout\Framework\Enums\ApplicationFolderName::ControllersFolderName);

        $this->params = array(
            BaseClassGenerator::NameSpaceKey => "Applications\\" . $Appname . "\Generated",
            BaseClassGenerator::ClassNameKey => $Appname . $this->GeneratedClassPrefix,
            BaseClassGenerator::DestinationDirKey => \Puzzlout\Framework\Enums\ApplicationFolderName::AppsFolderName .
            $Appname . \Puzzlout\Framework\Enums\ApplicationFolderName::Generated,
            BaseClassGenerator::ClassDescriptionKey => "Lists the constants for application controller classes to autocompletion and easy coding.",
            ConstantsClassGeneratorBase::DoGenerateConstantKeysKey => true,
            ConstantsClassGeneratorBase::DoGenerateGetListMethodKey => true
        );
        $this->GenerateApplicationFile($ApplicationControllers);
    }
60955
public function add_hooks()
	{
		if ( function_exists( 'add_action' )
			&& function_exists( 'add_filter' )
			&& function_exists( 'add_shortcode' )
		) {
			// Actions
			foreach ( $this->actions as $action ) {
				add_action(
					$action['hook'],
					[ &$this, $this->get_mapped_mvc_call( $action['mvc'] ) ],
					$action['priority'],
					$action['args']
				);
			}
			// Filters
			foreach ( $this->filters as $filter ) {
				add_filter(
					$filter['hook'],
					[ &$this, $this->get_mapped_mvc_call( $filter['mvc'], true ) ],
					$filter['priority'],
					$filter['args']
				);
			}
			// Filters
			foreach ( $this->shortcodes as $shortcode ) {
				add_shortcode(
					$shortcode['tag'],
					[ &$this, $this->get_mapped_mvc_call( $shortcode['mvc'], true ) ]
				);
			}
			// Widgets
			if ( count( $this->widgets ) > 0 ) {
        		add_action( 'widgets_init', [ &$this, '_widgets' ], 1 );
			}
		}
	}
717334
def set_hook_touch(self, fpath, action):
        
        self._set('hook-touch', '%s %s' % (fpath, action), multi=True)

        return self._section