Reliable Package Install and Upgrades
Permalink
So I checked out this how-to: http://www.concrete5.org/documentation/how-tos/developers/reliable-...
I've added this to my controller.php to install attributes:
Having done that, I'm getting this error:
Any ideas as to why?
I've added this to my controller.php to install attributes:
public function configureAttributes($pkg) { Loader::model('attribute/categories/collection'); $eaku = AttributeKeyCategory::getByHandle('collection'); $eaku->setAllowAttributeSets(AttributeKeyCategory::ASET_ALLOW_SINGLE); $eventpostSet = $eaku->addSet('event_post',t('News and Events'),$pkg); $bool = AttributeType::getByHandle('boolean'); //checkbox $dt = AttributeType::getByHandle('date_time'); //date picker $txt = AttributeType::getByHandle('text'); //text box $collection_attributes = array( array('akHandle' => 'is_featured', 'akName' => 'Featured Post', 'akType' => $bool), array('akHandle' => 'date_range', 'akName' => 'Multile Date Event', 'akType' => $bool),
Viewing 15 lines of 49 lines. View entire code block.
Having done that, I'm getting this error:
Catchable fatal error: Object of class AttributeType could not be converted to string in /Users/justrjlewis/RJLewisDesign/Sites/zphiboklahoma.org/concrete/libraries/3rdparty/adodb/adodb.inc.php on line 1015
Any ideas as to why?
First off I was assigning the Collection Attribute Key twice. My variables should have been:
instead of
Secondly, I modified the private function from the how-to so that the collection that I created is assigned to the new attributes, which required passing an additional variable in.