Skip to content

Instantly share code, notes, and snippets.

@eklect
Last active August 29, 2015 14:17
Show Gist options
  • Save eklect/2bb13b707c8895cc7afb to your computer and use it in GitHub Desktop.
Save eklect/2bb13b707c8895cc7afb to your computer and use it in GitHub Desktop.
c5 → Event Functions in Controller
<?php
//Use this function inside your controller to have it fire when you load the block.
//You can call any method inside the class, including action methods
public function on_start(){}
//This function fires when the view is rendered
//Use this function when you want to pass controller variables to the view
public function view(){}
//Use this method to fire on edit.php rendering for the block. You can set variables for the edit.php here as well
public function edit(){}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment