Skip to content

Instantly share code, notes, and snippets.

@damjan-d-g2
Created July 30, 2015 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damjan-d-g2/29304e92d9d23c6a1cd9 to your computer and use it in GitHub Desktop.
Save damjan-d-g2/29304e92d9d23c6a1cd9 to your computer and use it in GitHub Desktop.
A355_DudeMod
clients
base
layouts
setup
setup.php
menus
header
header.php
views
setup
setup.hbs
setup.js
language
A355_DudeMod.php
A355_DudeMod_sugar.php
@damjan-d-g2
Copy link
Author

// setup.php
$viewdefs['A355_DudeMod']['base']['layout']['setup'] = array(
'type' => 'simple',
'components' =>
array(
array(
'view' => 'setup',
),
),
);

@damjan-d-g2
Copy link
Author

//header.php
$moduleName = 'A355_DudeMod';
$viewdefs[$moduleName]['base']['menu']['header'] = array(
array(
'route' => "#$moduleName/setup",
'label' => 'LNK_SETUP',
'acl_action' => 'setup',
'acl_module' => $moduleName,
'icon' => 'icon-reorder',
),
);

@damjan-d-g2
Copy link
Author

// setup.hbs

Test view title

It should work :D.

@damjan-d-g2
Copy link
Author

// setup.js
({
className: 'A355_DudeMod-setup tcenter',
})

@damjan-d-g2
Copy link
Author

// A355_DudeMod.php
/**

  • THIS CLASS IS FOR DEVELOPERS TO MAKE CUSTOMIZATIONS IN
    */
    require_once('modules/A355_DudeMod/A355_DudeMod_sugar.php');
    class A355_DudeMod extends A355_DudeMod_sugar {

    /**

    • This is a depreciated method, please start using __construct() as this method will be removed in a future version
      *
    • @see __construct
    • @depreciated
      */
      function A355_DudeMod(){
      self::__construct();
      }

    public function __construct(){
    parent::__construct();
    error_log("in the constructor, my ass (from real)");
    }

}

@damjan-d-g2
Copy link
Author

// A355_DudeMod_sugar.php

/**

  • THIS CLASS IS GENERATED BY MODULE BUILDER
  • PLEASE DO NOT CHANGE THIS CLASS
  • PLACE ANY CUSTOMIZATIONS IN A355_DudeMod
    */

class A355_DudeMod_sugar extends Basic {
public $new_schema = true;
public $module_dir = 'A355_DudeMod';
public $object_name = 'A355_DudeMod';
public $table_name = 'a355_dudemod';
public $importable = false;
public $team_id;
public $team_set_id;
public $team_count;
public $team_name;
public $team_link;
public $team_count_link;
public $teams;
public $assigned_user_id;
public $assigned_user_name;
public $assigned_user_link;
public $id;
public $name;
public $date_entered;
public $date_modified;
public $modified_user_id;
public $modified_by_name;
public $created_by;
public $created_by_name;
public $doc_owner;
public $user_favorites;
public $description;
public $deleted;
public $created_by_link;
public $modified_user_link;
public $activities;
public $following;
public $following_link;
public $my_favorite;
public $favorite_link;

/**
 * This is a deprecated method, please start using __construct() as this
 * method will be removed in a future version.
 *
 * @see __construct
 * @deprecated
 */
public function A355_DudeMod_sugar(){
    $GLOBALS['log']->deprecated('Calls to A355_DudeMod::A355_DudeMod are deprecated.');
    self::__construct();
}

public function __construct(){
    parent::__construct();
    error_log('A355_DudeMod_sugar() constructor (in the real)');
}

public function bean_implements($interface){
    switch($interface){
        case 'ACL': return true;
    }
    return false;
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment