Hi, I’m trying to do add attributes programmatically to an Express database, I found in the documentation
use Express;
$object = Express::buildObject(‘marina2’, ‘marinas2’, ‘Marina2’);
$object->addAttribute(‘text’, ‘Name’, ‘marina_name’);
$object->addAttribute(‘address’, ‘Address’, ‘marina_address’);
$object = $object->save();
That works great to add a new database and add attributes to it, but I want to add attributes to an existing database
I tried grabbing the database object with
$object = Express::getObjectByHandle(‘marina’);
But that shows an error, Call to undefined method Concrete\Core\Entity\Express\Entity::addAttribute() Does anyone have an example on how to do this? Thanks