## Class mr_controller_block

Description

MR Controller for Blocks

- author: Mark Nielsen
- abstract:

Located in /controller/block.php (line 37)

    mr_readonly
       |
       --mr_controller
          |
          --mr_controller_block

Variable Summary
string $blockname
object $instance
Method Summary
object get_context ()
void new_url ([ $extraparams = array()])
void setup ()
Variables
string $blockname = 'UNKNOWN' (line 55)

The block name

- access: protected

object $instance = false (line 48)

Block instance record

This is NOT an instance of your block, EG NOT: new block_blockname()

This can be false if not found in the course.

- access: protected

#### Inherited Variables

Inherited from mr_controller

> mr_controller::$action
> mr_controller::$component
> mr_controller::$config
> mr_controller::$heading
> mr_controller::$helper
> mr_controller::$identifier
> mr_controller::$mroutput
> mr_controller::$name
> mr_controller::$output
> mr_controller::$plugin
> mr_controller::$tabs
> mr_controller::$url

Methods
get_context (line 104)

Get controller context

Get block context if we have block instance, otherwise use default context

- access: public

object get_context ()

Redefinition of:

mr_controller::get_context()
  Get controller context

new_url (line 89)

Generate a new URL to this controller

Only include block instance ID if it is passed.

- access: public

void new_url ([ $extraparams = array()])

- $extraparams

Redefinition of:

mr_controller::new_url()
  Generate a new URL to this controller

setup (line 69)

Controller setup

Set $blockname and $instance. For best results pass an instanceid URL param. Getting the instance is not required and is usually not necessary.

- see: mr_controller_block::$blockname, mr_controller_block::$instance
- throws: coding_exception
- access: public

void setup ()

Redefinition of:

mr_controller::setup()
  Controller setup

#### Inherited Methods

Inherited From mr_controller

> mr_controller::__construct()
> mr_controller::add_tabs()
> mr_controller::get_config()
> mr_controller::get_context()
> mr_controller::init()
> mr_controller::init_tabs()
> mr_controller::new_url()
> mr_controller::print_footer()
> mr_controller::print_header()
> mr_controller::render()
> mr_controller::require_capability()
> mr_controller::setup()

Inherited From mr_readonly

> mr_readonly::__call()

Documentation generated on Thu, 28 Jun 2012 16:33:46 -0700 by phpDocumentor 1.4.3