Carrington Build Documentation

Controlling Module Availability

If you only want your module to display under certain conditions you can override `list_admin()` method to control the module’s availability in the edit screen. Returning false from the `list_admin()` method will prevent the module from appearing in the module selection dialog. For example:

class my_build_module extends cfct_build_module {

	// ...

	public function list_admin() {
		if ( condition == true ) {
			return true;
		}
		else {
			return false;
		}
	}

	// ...
}

 

This does not prevent a module that is used in a layout from displaying in the layout. It simply prevents the addition of new modules of that type.

See also:

Back to Carrington Build

These sections are available to the public. The remaining sections are available exclusively to customers.