| @@ 531-541 (lines=11) @@ | ||
| 528 | * @return bool |
|
| 529 | * @since 1.8 |
|
| 530 | */ |
|
| 531 | public function disableMetadata($name = '') { |
|
| 532 | $options = array( |
|
| 533 | 'guid' => $this->guid, |
|
| 534 | 'limit' => 0 |
|
| 535 | ); |
|
| 536 | if ($name) { |
|
| 537 | $options['metadata_name'] = $name; |
|
| 538 | } |
|
| 539 | ||
| 540 | return elgg_disable_metadata($options); |
|
| 541 | } |
|
| 542 | ||
| 543 | /** |
|
| 544 | * Enables metadata for this entity, optionally based on name. |
|
| @@ 552-562 (lines=11) @@ | ||
| 549 | * @return bool |
|
| 550 | * @since 1.8 |
|
| 551 | */ |
|
| 552 | public function enableMetadata($name = '') { |
|
| 553 | $options = array( |
|
| 554 | 'guid' => $this->guid, |
|
| 555 | 'limit' => 0 |
|
| 556 | ); |
|
| 557 | if ($name) { |
|
| 558 | $options['metadata_name'] = $name; |
|
| 559 | } |
|
| 560 | ||
| 561 | return elgg_enable_metadata($options); |
|
| 562 | } |
|
| 563 | ||
| 564 | /** |
|
| 565 | * Get a piece of volatile (non-persisted) data on this entity. |
|