Author: david
Date: Mon Jun 27 15:46:50 2011
New Revision: 9200

Log:
Remove QubitRelation note methods - no longer needed.  Refs 
http://projects.artefactual.com/issues/21

Modified:
   trunk/lib/model/QubitRelation.php

Modified: trunk/lib/model/QubitRelation.php
==============================================================================
--- trunk/lib/model/QubitRelation.php   Mon Jun 27 15:43:05 2011        (r9199)
+++ trunk/lib/model/QubitRelation.php   Mon Jun 27 15:46:50 2011        (r9200)
@@ -271,84 +271,5 @@
 
     return $opposite;
   }
-
-  /**
-   * Add a related note for this object
-   *
-   * @param string $note text of note
-   * @param integer $noteTypeId QubitTerm constant describing note
-   * @return QubitNote new note object
-   */
-  public function addNote($text, $noteTypeId)
-  {
-    // Don't create a note with a blank text or a null noteTypeId
-    if (0 < strlen($text) && 0 !== intval($noteTypeId))
-    {
-      $newNote = new QubitNote;
-      $newNote->setScope('QubitRelation');
-      $newNote->setContent($text);
-      $newNote->setTypeId($noteTypeId);
-
-      $this->notes[] = $newNote;
-    }
-
-    return $this;
-  }
-
-  /**
-   * Update an related note
-   *
-   * @param string $note text of note
-   * @param integer $noteTypeId QubitTerm constant describing note
-   * @return QubitNote note object
-   */
-  public function updateNote($text, $noteTypeId)
-  {
-    $existingNote = false;
-    foreach ($this->notes as $key => $note)
-    {
-      if ($note->typeId == $noteTypeId)
-      {
-        if (0 == strlen($text))
-        {
-          // If $text is blank, then delete note object
-          $note->delete();
-          unset($this->notes[$key]);
-        }
-        else
-        {
-          // Update existing note
-          $note->setContent($text);
-        }
-
-        $existingNote = true;
-        break;
-      }
-    }
-
-    if (false === $existingNote)
-    {
-      // Add new note
-      return $this->addNote($text, $noteTypeId);
-    }
-    else
-    {
-      return $this;
-    }
-  }
-
-  /**
-   * Get a note related to this object filtered by TYPE_ID column
-   *
-   * @param integer $noteTypeId note type
-   * @return QubitNote found note
-   */
-  public function getNoteByTypeId($noteTypeId)
-  {
-    $criteria = new Criteria;
-    $criteria->add(QubitNote::OBJECT_ID, $this->id);
-    $criteria->add(QubitNote::TYPE_ID, $noteTypeId);
-
-    return QubitNote::getOne($criteria);
-  }
+ }
 }

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to