Properties in Controller.php
Controller.php contains data about our block, as well as methods that automatically get run when different things happen to our block.
Required Properties
btDescription: This is the description of what the block does. It's displayed in the dashboard and in the add block interface.
btName: The name of the block.
Optional Properties
btTable: The block's primary database table. If specified, and if the block only uses this one database table, then the block will be able to automatically save its information to this table, provided the block's form fields map directly to the columns in the database.
btInterfaceWidth: The width of the modal popup dialog box that holds this block when it is added or edited.
btInterfaceHeight: The height of the modal popup dialog box that holds this block when it is added or edited.
So you see, this is how our block knew that it was supposed to be named "Basic Test": it's contained within our block's class file. As you can see, that's the extent of our test block's controller. More information could be in this controller, however.
Example:
<?php
class BasicTestBlockController extends BlockController {
var $pobj;
protected $btDescription = "A simple testing block for developers.";
protected $btName = "Basic Test";
protected $btTable = 'btBasicTest';
protected $btInterfaceWidth = "350";
protected $btInterfaceHeight = "300";
}
?>
Thanks a lot, this code was of great help to me!