diff --git a/ItemRelationsPlugin.php b/ItemRelationsPlugin.php index c7ea91c..4c6a96d 100644 --- a/ItemRelationsPlugin.php +++ b/ItemRelationsPlugin.php @@ -41,7 +41,7 @@ class ItemRelationsPlugin extends Omeka_Plugin_AbstractPlugin 'admin_navigation_main', 'api_resources', ); - + public function filterApiResources($apiResources) { // For the resource URI: /api/your_resources/[:id] @@ -71,16 +71,16 @@ public function filterApiResources($apiResources) 'record_type' => 'ItemRelationsVocabulary', // List of actions available for your resource. 'actions' => array( - 'index', // GET request without ID + 'index', // GET request without ID 'get', // GET request with ID 'post', // POST request 'put', // PUT request (ID is required) 'delete', // DELETE request (ID is required) - ), + ), // List of GET parameters available for your index action. 'index_params' => array('label', 'id', 'name', 'namespace_uri', 'namespace_prefix'), ); - + //Added GET only for looking up properties, TODO Post and Put $apiResources['item_relations_properties'] = array( // Module associated with your resource. @@ -99,7 +99,7 @@ public function filterApiResources($apiResources) // List of GET parameters available for your index action. 'index_params' => array('label', 'id', 'vocabulary_id'), ); - /* + /* //Added GET only $apiResources['autocomplete_item'] = array( // Module associated with your resource. @@ -371,7 +371,7 @@ public function hookAdminItemsSearch() 'formSelectProperties' => get_table_options('ItemRelationsProperty')) ); } - + /** * Save the item relations after saving an item add/edit form. * diff --git a/models/ItemRelationsProperty.php b/models/ItemRelationsProperty.php index 88b040e..9ba2468 100644 --- a/models/ItemRelationsProperty.php +++ b/models/ItemRelationsProperty.php @@ -31,10 +31,10 @@ class ItemRelationsProperty extends Omeka_Record_AbstractRecord implements Zend_ * @var string */ public $friendly_part; - + /** * Human-readable name for the property. - * @var string + * @var string */ public $label; @@ -66,7 +66,7 @@ public function getText() && $this->friendly_part ) { $text = $this->friendly_part; - + } else if ($hasLabel) { $text = $this->label; } else { @@ -75,8 +75,8 @@ public function getText() return $text; } - - + + /** * Identify records as relating to their ACL resource. * diff --git a/models/ItemRelationsRelation.php b/models/ItemRelationsRelation.php index 5329a0d..f7eaa58 100644 --- a/models/ItemRelationsRelation.php +++ b/models/ItemRelationsRelation.php @@ -30,7 +30,7 @@ class ItemRelationsRelation extends Omeka_Record_AbstractRecord implements Zend */ public $object_item_id; protected function _validate() - { + { //echo "Validating"; if (empty($this->subject_item_id)) { $this->addError('subject_item_id', __('Relation requires subject item ID.')); @@ -57,7 +57,7 @@ public function getPropertyText() } /** /* Identify ItemRelationsRelation records as relating to the ItemRelationsRelations ACL resource. - * + * * @return string */ public function getResourceId()