Class name must be a valid object or a string
Permalink
I am developing a custom block for version 5.8. I followed all the steps in the C5 development manual, but anytime I go to install the block, it gives me a "Class name must be a valid object or string" error. What am I doing wrong?
Here's my controller.php code:
Here's my controller.php code:
<?php namespace Application\Block\product_information; use Concrete\Core\Block\BlockController; class Controller extends BlockController { protected $btTable = 'btProductInformation'; protected $btInterfaceWidth = "590"; protected $btInterfaceHeight = "450"; protected $btCacheBlockRecord = true; protected $btCacheBlockOutput = true; protected $btCacheBlockOutputOnPost = true; protected $btCacheBlockOutputForRegisteredUsers = true; protected $btCacheBlockOutputLifetime = CACHE_LIFETIME; public function getBlockTypeDescription() { return t("Embeds Product Information in your web page."); }
Viewing 15 lines of 33 lines. View entire code block.
Thank You!
Hi,
I am going through same problem but this solution is not working for me. Please help me. Thanks In advance
I am going through same problem but this solution is not working for me. Please help me. Thanks In advance
What is the filename and directory name?
namespace Application\Block\product_information;
Into this line:
namespace Application\Block\ProductInformation;