Author: jablko
Date: Mon Oct 18 20:50:30 2010
New Revision: 8266
Log:
Reorganize
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedAuthorityRecordComponent.class.php
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedResourceComponent.class.php
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedAuthorityRecordComponent.class.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedAuthorityRecordComponent.class.php
Mon Oct 18 20:48:01 2010 (r8265)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedAuthorityRecordComponent.class.php
Mon Oct 18 20:50:30 2010 (r8266)
@@ -87,24 +87,6 @@
public function processForm()
{
- $this->updateActorRelations();
- $this->deleteActorRelations();
-
- return parent::processForm();
- }
-
- public function execute($request)
- {
- parent::execute($request);
-
-
$this->form->getWidgetSchema()->setNameFormat('relatedAuthorityRecord[%s]');
- }
-
- /**
- * Update actor relationships
- */
- protected function updateActorRelations()
- {
if (isset($this->request->relatedActors))
{
// JavaScript (multiple) update
@@ -173,11 +155,6 @@
}
}
- return $this;
- }
-
- protected function deleteActorRelations()
- {
if (isset($this->request->deleteRelations))
{
foreach ((array) $this->request->deleteRelations as $relationId =>
$value)
@@ -186,5 +163,14 @@
$relation->delete();
}
}
+
+ return parent::processForm();
+ }
+
+ public function execute($request)
+ {
+ parent::execute($request);
+
+
$this->form->getWidgetSchema()->setNameFormat('relatedAuthorityRecord[%s]');
}
}
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedResourceComponent.class.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedResourceComponent.class.php
Mon Oct 18 20:48:01 2010 (r8265)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/relatedResourceComponent.class.php
Mon Oct 18 20:50:30 2010 (r8266)
@@ -90,26 +90,6 @@
public function processForm()
{
- $this->updateEvents();
- $this->deleteEvents();
-
- return parent::processForm();
- }
-
- public function execute($request)
- {
- parent::execute($request);
-
- $this->form->getWidgetSchema()->setNameFormat('relatedResource[%s]');
- }
-
- /**
- * Add or update events related to this actor
- *
- * @return ActorEditAction this object
- */
- protected function updateEvents()
- {
if (isset($this->request->relatedResources))
{
// The "updateEvents" array is created by the actorEventDialog.js
@@ -172,16 +152,6 @@
$this->resource->events[] = $event;
}
- return $this;
- }
-
- /**
- * Delete related events that are marked for deletion.
- *
- * @return ActorEditAction $this object
- */
- public function deleteEvents()
- {
if (is_array($deleteEvents = $this->request->deleteEvents))
{
foreach ($deleteEvents as $deleteId => $doDelete)
@@ -193,6 +163,13 @@
}
}
- return $this;
+ return parent::processForm();
+ }
+
+ public function execute($request)
+ {
+ parent::execute($request);
+
+ $this->form->getWidgetSchema()->setNameFormat('relatedResource[%s]');
}
}
--
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.