How to install a new attribute in a 5.7 package?

Permalink 1 user found helpful
Found a couple of very basic howto's for converting a package to work in V5.7 but so far unable to find anything about how to do the below. Was going to try converting one of my popular add-ons to 5.7 this weekend... perhaps not :o/ Just need to be able to add an attribute programmatically.

$att = AttributeType::getByHandle('boolean');
if( !is_object($testAttribute3) ) {
    CollectionAttributeKey::add($att, array('akHandle' => 'display_in_surefyre_calendar', 'akName' => t('Show this item in Calendar Nav'), 'akIsSearchable' => true, 'akCheckedByDefault' => true), $pkg);

View Replies:
pvernaglia replied on at Permalink Reply
In the namespace section of your controller add:

use \Concrete\Core\Attribute\Type as AttributeType;
use CollectionAttributeKey;

As you're figuring attribute stuff out please post!
surefyre replied on at Permalink Reply
I'm going to give this a try today so if I have any success I'll feed back
to this thread!


Linked In <> - G+
<> - Fonovation Limited
<> - Surefyre
Design <>

On 20 September 2014 20:16, concrete5 Community <[email protected]
> wrote:
surefyre replied on at Permalink Reply
Yep, that worked :o)

Now to sort the changes for the new version of jQuery :o/