Skip to content

Instantly share code, notes, and snippets.

@sevein
Last active Aug 29, 2015
Embed
What would you like to do?
diff --git a/lib/model/om/BaseInformationObject.php b/lib/model/om/BaseInformationObject.php
index e35c534..171266e 100644
--- a/lib/model/om/BaseInformationObject.php
+++ b/lib/model/om/BaseInformationObject.php
@@ -130,11 +130,6 @@ abstract class BaseInformationObject extends QubitObject implements ArrayAccess
return true;
}
- if ('events' == $name)
- {
- return true;
- }
-
if ('informationObjectsRelatedByparentId' == $name)
{
return true;
@@ -206,23 +201,6 @@ abstract class BaseInformationObject extends QubitObject implements ArrayAccess
return $this->refFkValues['digitalObjects'];
}
- if ('events' == $name)
- {
- if (!isset($this->refFkValues['events']))
- {
- if (!isset($this->id))
- {
- $this->refFkValues['events'] = QubitQuery::create();
- }
- else
- {
- $this->refFkValues['events'] = self::geteventsById($this->id, array('self' => $this) + $options);
- }
- }
-
- return $this->refFkValues['events'];
- }
-
if ('informationObjectsRelatedByparentId' == $name)
{
if (!isset($this->refFkValues['informationObjectsRelatedByparentId']))
@@ -537,26 +515,6 @@ abstract class BaseInformationObject extends QubitObject implements ArrayAccess
return self::adddigitalObjectsCriteriaById($criteria, $this->id);
}
- public static function addeventsCriteriaById(Criteria $criteria, $id)
- {
- $criteria->add(QubitEvent::OBJECT_ID, $id);
-
- return $criteria;
- }
-
- public static function geteventsById($id, array $options = array())
- {
- $criteria = new Criteria;
- self::addeventsCriteriaById($criteria, $id);
-
- return QubitEvent::get($criteria, $options);
- }
-
- public function addeventsCriteria(Criteria $criteria)
- {
- return self::addeventsCriteriaById($criteria, $this->id);
- }
-
public static function addinformationObjectsRelatedByparentIdCriteriaById(Criteria $criteria, $id)
{
$criteria->add(QubitInformationObject::PARENT_ID, $id);
diff --git a/plugins/qtAccessionPlugin/lib/model/om/BaseAccession.php b/plugins/qtAccessionPlugin/lib/model/om/BaseAccession.php
index 2fef269..9aa4fdf 100644
--- a/plugins/qtAccessionPlugin/lib/model/om/BaseAccession.php
+++ b/plugins/qtAccessionPlugin/lib/model/om/BaseAccession.php
@@ -176,23 +176,6 @@ abstract class BaseAccession extends QubitObject implements ArrayAccess
return $this->refFkValues['deaccessions'];
}
- if ('events' == $name)
- {
- if (!isset($this->refFkValues['events']))
- {
- if (!isset($this->id))
- {
- $this->refFkValues['events'] = QubitQuery::create();
- }
- else
- {
- $this->refFkValues['events'] = self::geteventsById($this->id, array('self' => $this) + $options);
- }
- }
-
- return $this->refFkValues['events'];
- }
-
try
{
if (1 > strlen($value = call_user_func_array(array($this->getCurrentaccessionI18n($options), '__get'), $args)) && !empty($options['cultureFallback']))
@@ -355,19 +338,4 @@ abstract class BaseAccession extends QubitObject implements ArrayAccess
return $accessionI18ns[$options['culture']];
}
-
- public static function geteventsById($id, array $options = array())
- {
- $criteria = new Criteria;
- self::addeventsCriteriaById($criteria, $id);
-
- return QubitEvent::get($criteria, $options);
- }
-
- public static function addeventsCriteriaById(Criteria $criteria, $id)
- {
- $criteria->add(QubitEvent::OBJECT_ID, $id);
-
- return $criteria;
- }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment