Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyCustomBlockController extends BlockController {
- public $cobj;
- protected $btTable = 'btMyCustom';
- protected $btInterfaceWidth = '500';
- protected $btInterfaceHeight = '365';
- public function __construct($obj = null) {
- $cobj = Page::getCurrentPage();
- if (is_object($cobj)) {
- $this->cobj = $cobj;
- } elseif(is_object($obj) && strtolower(get_class($obj))=="block") {
- $this->bID = $obj->bID;
- $this->cobj = $obj->getBlockCollectionObject();
- }
- parent::__construct($obj);
- // comment this out, output should really only happen in the block View (view.php)
- $reflect = new ReflectionClass($this->cobj);
- $methods = $reflect->getMethods();
- dump($methods, '$cobj Methods');
- dump($this->cobj, '$this->cobj');
- }
- private function dump($val, $title='') {
- echo '<pre>'. ($title ? '<strong>'. $title. '</strong>: ' : ''). print_r($val, 1). '</pre>';
- }
- }
Add Comment
Please, Sign In to add comment