Author: david
Date: Wed Oct 7 22:42:39 2009
New Revision: 3687
Log:
Change name of 'display_as_compound_object' property to 'displayAsCompound'.
Modified:
trunk/apps/qubit/modules/digitalobject/actions/editAction.class.php
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php
trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php
trunk/lib/model/QubitDigitalObject.php
Modified: trunk/apps/qubit/modules/digitalobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/actions/editAction.class.php Wed Oct
7 16:47:30 2009 (r3686)
+++ trunk/apps/qubit/modules/digitalobject/actions/editAction.class.php Wed Oct
7 22:42:39 2009 (r3687)
@@ -71,7 +71,7 @@
// Set 'displayAsCompound' value from QubitProperty
$c = new Criteria;
$c->add(QubitProperty::OBJECT_ID, $this->digitalObject->id,
Criteria::EQUAL);
- $c->add(QubitProperty::NAME, 'display_as_compound_object',
Criteria::EQUAL);
+ $c->add(QubitProperty::NAME, 'displayAsCompound', Criteria::EQUAL);
if (null != ($compoundProperty = QubitProperty::getOne($c)))
{
@@ -192,7 +192,7 @@
*/
public function processUpdateForm()
{
- // Set property 'display_as_compound_object'
+ // Set property 'displayAsCompound'
$displayAsCompound = $this->form->getValue('displayAsCompound');
$this->digitalObject->setDisplayAsCompoundObject($displayAsCompound);
Modified:
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php
==============================================================================
---
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php
Wed Oct 7 16:47:30 2009 (r3686)
+++
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php
Wed Oct 7 22:42:39 2009 (r3687)
@@ -34,8 +34,8 @@
*/
public function execute($request)
{
- // Make sure that this 'display_as_compound_object' is set to yes
- $displayAsCompoundProp =
QubitProperty::getOneByObjectIdAndName($this->digitalObject->id,
'display_as_compound_object');
+ // Make sure that this 'displayAsCompound' is set to yes
+ $displayAsCompoundProp =
QubitProperty::getOneByObjectIdAndName($this->digitalObject->id,
'displayAsCompound');
$this->isCompoundDigitalObject = (is_null($displayAsCompoundProp)) ? false
: true;
$this->masterDigitalObject = $this->digitalObject;
$this->informationObject = $this->digitalObject->informationObject;
Modified: trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php Wed Oct
7 16:47:30 2009 (r3686)
+++ trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php Wed Oct
7 22:42:39 2009 (r3687)
@@ -44,7 +44,7 @@
<legend><?php echo __('Representations') ?></legend>
<?php foreach ($representations as $usageId => $representation): ?>
- <?php if (is_object($representation) && $representation->getId()): ?>
+ <?php if (null !== $representation): ?>
<?php include_component('digitalobject', 'editRepresentation',
array('digitalObject'=>$digitalObject,
'representation'=>$representation)); ?>
<?php else: ?>
Modified: trunk/lib/model/QubitDigitalObject.php
==============================================================================
--- trunk/lib/model/QubitDigitalObject.php Wed Oct 7 16:47:30 2009
(r3686)
+++ trunk/lib/model/QubitDigitalObject.php Wed Oct 7 22:42:39 2009
(r3687)
@@ -1653,7 +1653,7 @@
* --------------------------------------------------------------------- */
/**
- * Setter for "display_as_compound_object" property
+ * Setter for "displayAsCompound" property
*
* @param string $value new value for property
* @return QubitInformationObject this object
@@ -1662,14 +1662,14 @@
{
$criteria = new Criteria;
$criteria->add(QubitProperty::OBJECT_ID, $this->id, Criteria::EQUAL);
- $criteria->add(QubitProperty::NAME, 'display_as_compound_object');
+ $criteria->add(QubitProperty::NAME, 'displayAsCompound');
$displayAsCompoundProp = QubitProperty::getOne($criteria);
if (is_null($displayAsCompoundProp))
{
$displayAsCompoundProp = new QubitProperty;
$displayAsCompoundProp->setObjectId($this->getId());
- $displayAsCompoundProp->setName('display_as_compound_object');
+ $displayAsCompoundProp->setName('displayAsCompound');
}
$displayAsCompoundProp->setValue($value, array('sourceCulture' => true));
@@ -1679,13 +1679,13 @@
}
/**
- * Getter for related "display_as_compound_object" property
+ * Getter for related "displayAsCompound" property
*
* @return string property value
*/
public function getDisplayAsCompoundObject()
{
- $displayAsCompoundProp =
QubitProperty::getOneByObjectIdAndName($this->getId(),
'display_as_compound_object');
+ $displayAsCompoundProp =
QubitProperty::getOneByObjectIdAndName($this->getId(), 'displayAsCompound');
if (null !== $displayAsCompoundProp)
{
@@ -1695,7 +1695,7 @@
/**
* Decide whether to show child digital objects as a compound object based
- * on 'display_as_compound_object' toggle and available digital objects.
+ * on 'displayAsCompound' toggle and available digital objects.
*
* @return boolean
*/
@@ -1710,7 +1710,7 @@
}
// Return false if "show compound" toggle is not set to '1' (yes)
- $showCompoundProp = QubitProperty::getOneByObjectIdAndName($this->getId(),
'display_as_compound_object');
+ $showCompoundProp = QubitProperty::getOneByObjectIdAndName($this->getId(),
'displayAsCompound');
if (null === $showCompoundProp || '1' !=
$showCompoundProp->getValue(array('sourceCulture' => true)) )
{
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---