Is there a functionality Documentation for c5?
Permalink
Hi,
I am new to c5 and i have been having a trouble of understanding c5. I have been looking through the docs trying to learn how to create blocks. I downloaded the basic_block sample and it didn't work. After looking around and googling about i finally found out how to do it. The documents are very misleading sometimes or it might be me misunderstanding things or it might be out of date. This is the sample code in the controller was :
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
class BasicTestBlockController extends BlockController {
protected $btTable = "btBasicTest";
protected $btInterfaceWidth = "350";
protected $btInterfaceHeight = "300";
public function getBlockTypeName() {
return t('Basic Test');
}
public function getBlockTypeDescription() {
return t('A simple testing block for developers');
}
}
when it should of been something like:
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
namespace Application\Block\NewBlock;
use Concrete\Core\Block\BlockController;
use Core;
class Controller extends BlockController {
protected $btTable = "btBasicTest";
protected $btInterfaceWidth = "350";
protected $btInterfaceHeight = "300";
public function getBlockTypeName() {
return t('Basic Test');
}
public function getBlockTypeDescription() {
return t('A simple testing block for developers');
}
}
This wasn't mention in the docs so if anyone is having trouble the above here a solution to
"Class 'BlockController' not found"
And "Class '\Application\Block\NewBlock\Controller' not found".
Anyways reading a long again and looking through concrete5 blocks (the already built in ones). I notice div tags such as "ccm-tooltip-holder" and notice they all had "ccm". So i tried googling about and seeing if that is c5 standardize way of adding div tags for responsive web page but i couldn't find anything about it, so i am not sure what it actually does and left it as it is.
I then looked into some c5 blocks and notice there were function. function such as:
$db = Database::get();
I tried googling again and nothing came up for me, but i found this line
$db= Loader::db();
I started guessing if they the same and after a test it did what i want. It would be nice if there were a functionality document page for developers to look through what function they could use and a bit about the div tags.
Thanks anyways.
I am new to c5 and i have been having a trouble of understanding c5. I have been looking through the docs trying to learn how to create blocks. I downloaded the basic_block sample and it didn't work. After looking around and googling about i finally found out how to do it. The documents are very misleading sometimes or it might be me misunderstanding things or it might be out of date. This is the sample code in the controller was :
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
class BasicTestBlockController extends BlockController {
protected $btTable = "btBasicTest";
protected $btInterfaceWidth = "350";
protected $btInterfaceHeight = "300";
public function getBlockTypeName() {
return t('Basic Test');
}
public function getBlockTypeDescription() {
return t('A simple testing block for developers');
}
}
when it should of been something like:
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
namespace Application\Block\NewBlock;
use Concrete\Core\Block\BlockController;
use Core;
class Controller extends BlockController {
protected $btTable = "btBasicTest";
protected $btInterfaceWidth = "350";
protected $btInterfaceHeight = "300";
public function getBlockTypeName() {
return t('Basic Test');
}
public function getBlockTypeDescription() {
return t('A simple testing block for developers');
}
}
This wasn't mention in the docs so if anyone is having trouble the above here a solution to
"Class 'BlockController' not found"
And "Class '\Application\Block\NewBlock\Controller' not found".
Anyways reading a long again and looking through concrete5 blocks (the already built in ones). I notice div tags such as "ccm-tooltip-holder" and notice they all had "ccm". So i tried googling about and seeing if that is c5 standardize way of adding div tags for responsive web page but i couldn't find anything about it, so i am not sure what it actually does and left it as it is.
I then looked into some c5 blocks and notice there were function. function such as:
$db = Database::get();
I tried googling again and nothing came up for me, but i found this line
$db= Loader::db();
I started guessing if they the same and after a test it did what i want. It would be nice if there were a functionality document page for developers to look through what function they could use and a bit about the div tags.
Thanks anyways.
Hi dworker2015,
I think you were looking at the documentation for 5.6.
The documentation for 5.7 is here:
http://www.concrete5.org/documentation/developers/5.7/working-with-...
I think you were looking at the documentation for 5.6.
The documentation for 5.7 is here:
http://www.concrete5.org/documentation/developers/5.7/working-with-...
Thanks but there are some functionality i couldn't find. I.E "use Database"
namespace Application\Block\NewBlock;
use Concrete\Core\Block\BlockController;
use Core;
<?php defined('C5_EXECUTE') or die(_("Access Denied."));
class Controller extends BlockController {
protected $btTable = "btBasicTest";
protected $btInterfaceWidth = "350";
protected $btInterfaceHeight = "300";
public function getBlockTypeName() {
return t('Basic Test');
}
public function getBlockTypeDescription() {
return t('A simple testing block for developers');
}
}