Skip to content

Instantly share code, notes, and snippets.


Romans Malinovskis romaninsh

Block or report user

Report or block romaninsh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
romaninsh / atk-demo-1.php
Created Nov 1, 2010
Simple Grid on Agile Toolkit , PHP5
View atk-demo-1.php
// All the new views or objects needs to be added. When you do that - new object becomes child. This determines location where it appears on the page.
// For example $p is the "Demo" tab. What you add into $p will always be in there.
// You can define multiple columns inside grid using addColumn() method. Columns must correspond with the hash keys in the data
View gist:2414116
if [ $# -lt 1 -o $# -gt 4 ]
echo "Usage: $0 log_to_be_checked [cc-emails [to-email [subject]]]" >&2
exit 1
View gist:3324732
filter: 'tr',
cancel: '.ui-button,a,:input,option',
stop: function(){ c
View gist:3361810
View gist:4126496
class Controller_Element extends Controller {
function addFields($m){
View Form.php
class Form extends Form_Basic {
public $split_columns=true;
function init(){
$this->setFormClass('stacked atk-row');
function recursiveRender(){
if(count($this->elements)>8 && $this->split_columns){
View gist:4724822

Changes 4.2.3 to 4.2.4

Note: for diff see:


  • Added PSR-2 compliance to many core files. Will continue to improve other classes too.
  • Added composer.json. Agile Toolkit can be installed through Composer now
  • when calling setController, second argument can specify name or default options
  • Security fixes in Logger
View gist:5313222

Pattern Router

A typical Agile Toolkit application converts your URL into a page. For example /mysite/profile?id=123 normally could be implemented like this:

class page_profile extends Page {
     function init(){
     function defaultTemplate(){
romaninsh / View_CommentTree.php
Created Apr 8, 2013
Example of hierarchy add-on use in agile toolkit
View View_CommentTree.php
class View_CommentTree extends hierarchy\View_Tree {
function init(){
function formatRow(){
$this->current_row['added']=$this->time_ctl->fancy_datetime($this->current_row['added']).' ago';
View gist:5444357
RewriteEngine On
RewriteRule ^[^\.]*$ index.php [L]
You can’t perform that action at this time.