public function publish(AttributeKey $ak, Package $pkg = null)
 {
     /** @var $category UserAttributeKeyCategoryInstance */
     $category = $ak->getCategory();
     $key = UserKey::add($ak->getType(), array('akHandle' => $ak->getHandle(), 'akName' => $ak->getName(), 'akIsInternal' => $ak->getIsInternal(), 'akIsSearchableIndexed' => $ak->getIsIndexed(), 'akIsSearchable' => $ak->getIsSearchable(), 'uakProfileDisplay' => $category->getDisplayedInProfile(), 'uakProfileEdit' => $category->getEditableInProfile(), 'uakProfileEditRequired' => $category->getRequiredInProfile(), 'uakRegisterEdit' => $category->getEditableInRegistration(), 'uakRegisterEditRequired' => $category->getRequiredInRegistration(), 'uakMemberListDisplay' => $category->getDisplayedInMemberList()), $pkg);
     return $key;
 }
 public function publish(AttributeKey $ak, Package $pkg = null)
 {
     $key = FileKey::add($ak->getType(), array('akHandle' => $ak->getHandle(), 'akName' => $ak->getName(), 'akIsInternal' => $ak->getIsInternal(), 'akIsSearchableIndexed' => $ak->getIsIndexed(), 'akIsSearchable' => $ak->getIsSearchable()), $pkg);
     return $key;
 }