当前位置: 首页>>代码示例>>PHP>>正文


PHP ca_objects::get方法代码示例

本文整理汇总了PHP中ca_objects::get方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_objects::get方法的具体用法?PHP ca_objects::get怎么用?PHP ca_objects::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca_objects的用法示例。


在下文中一共展示了ca_objects::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAllItemInfo

 protected function getAllItemInfo()
 {
     $va_info = parent::getAllItemInfo();
     if ($this->getTableName() == 'ca_objects' && is_array($va_info) && sizeof($va_info) > 0) {
         $t_object = new ca_objects($va_info['object_id']['value']);
         if (!$t_object->getPrimaryKey()) {
             return $va_info;
         }
         // include number of 'likes' (comments)
         $va_info['likes'] = (int) $t_object->getNumComments(null);
         // include copyright holder
         $vs_copyright_holder = $t_object->get('ca_entities.preferred_labels', array('restrictToRelationshipTypes' => 'copyright'));
         if ($vs_copyright_holder) {
             $va_info['copyright_holder'] = $vs_copyright_holder;
         }
         // include urls for reference img
         $va_objects = $t_object->getRelatedItems('ca_objects', array('restrictToRelationshipTypes' => 'reference'));
         if (!is_array($va_objects) || sizeof($va_objects) != 1) {
             return $va_info;
         }
         $va_object = array_shift($va_objects);
         $t_rel_object = new ca_objects($va_object['object_id']);
         $va_rep = $t_rel_object->getPrimaryRepresentation(array('preview170', 'medium', 'alhalqa1000', 'alhalqa2000'));
         if (!is_array($va_rep) || !is_array($va_rep['urls'])) {
             return $va_info;
         }
         $va_info['reference_image_urls'] = $va_rep['urls'];
     }
     return $va_info;
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:30,代码来源:AlhalqaItemService.php

示例2: testGets

 public function testGets()
 {
     $vm_ret = $this->opt_object->get('ca_objects.type_id', array('convertCodesToDisplayText' => true));
     $this->assertEquals('Image', $vm_ret);
     // there are two internal notes but we assume that only the current UI locale is returned, unless we explicitly say otherwise
     $vm_ret = $this->opt_object->get('ca_objects.internal_notes');
     $this->assertEquals("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ullamcorper sapien nec velit porta luctus.", $vm_ret);
     $vm_ret = $this->opt_object->get('internal_notes');
     $this->assertEquals("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ullamcorper sapien nec velit porta luctus.", $vm_ret);
     $vm_ret = $this->opt_object->get('ca_objects.external_link.url_source');
     $this->assertEquals("My URL source;Another URL source", $vm_ret);
     $vm_ret = $this->opt_object->get('ca_objects.dimensions.dimensions_length');
     $this->assertEquals("10.0 in", $vm_ret);
     $vm_ret = $this->opt_object->get('ca_objects.dimensions.dimensions_weight');
     $this->assertEquals("2.0000 lb", $vm_ret);
     $vm_ret = $this->opt_object->get('ca_objects.integer_test', array('delimiter' => ' / '));
     $this->assertEquals("23 / 1984", $vm_ret);
     $vm_ret = $this->opt_object->get('ca_objects.currency_test');
     $this->assertEquals("USD 100.00", $vm_ret);
     $vm_ret = $this->opt_object->get('ca_objects.georeference');
     $this->assertRegExp("/^1600 Amphitheatre Parkway, Mountain View, CA \\[[\\d\\.\\,\\-]+\\]/", $vm_ret);
     // This is how we fetch the bundle preview for containers:
     $vs_template = "<unit relativeTo='ca_objects.dimensions'><if rule='^measurement_notes =~ /foo/'>^ca_objects.dimensions.dimensions_length</if></unit>";
     $vm_ret = $this->opt_object->getAttributesForDisplay('dimensions', $vs_template);
     $this->assertEquals('10.0 in', $vm_ret);
     // shouldn't return anything because the expression is false
     $vs_template = "<unit relativeTo='ca_objects.dimensions'><if rule='^measurement_notes =~ /bar/'>^ca_objects.dimensions.dimensions_length</if></unit>";
     $vm_ret = $this->opt_object->getAttributesForDisplay('dimensions', $vs_template);
     $this->assertEmpty($vm_ret);
     // 'flat' informationservice attribues
     $this->assertEquals('Coney Island', $this->opt_object->get('ca_objects.tgn'));
     $this->assertContains('Aaron Burr', $this->opt_object->get('ca_objects.wikipedia'));
     // new subfield notation
     $this->assertContains('Burr killed his political rival Alexander Hamilton in a famous duel', $this->opt_object->get('ca_objects.wikipedia.abstract'));
     // informationservice attributes in container
     $this->assertEquals('[500024253] Haring, Keith (Persons, Artists) - American painter, muralist, and cartoonist, 1958-1990', $this->opt_object->get('ca_objects.informationservice.ulan_container'));
     $this->assertContains('Aaron Burr', $this->opt_object->get('ca_objects.informationservice.wiki'));
     $this->assertContains('Burr killed his political rival Alexander Hamilton in a famous duel', $this->opt_object->get('ca_objects.informationservice.wiki.abstract'));
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:39,代码来源:AttributeGetTest.php

示例3: search

 protected function search($pa_bundles = null)
 {
     $va_return = parent::search($pa_bundles);
     if ($this->getTableName() == 'ca_objects' && is_array($va_return['results']) && sizeof($va_return['results']) > 0) {
         $pb_only_with_likes = (bool) $this->opo_request->getParameter('likesOnly', pInteger);
         foreach ($va_return['results'] as $vn_k => &$va_result) {
             $t_object = new ca_objects($va_result['object_id']);
             if (!$t_object->getPrimaryKey()) {
                 continue;
             }
             // include number of 'likes' (comments)
             $va_result['likes'] = (int) $t_object->getNumComments(null);
             if ($pb_only_with_likes && !$va_result['likes']) {
                 unset($va_return['results'][$vn_k]);
                 continue;
             }
             // include copyright holder
             $vs_copyright_holder = $t_object->get('ca_entities.preferred_labels', array('restrictToRelationshipTypes' => 'copyright'));
             if ($vs_copyright_holder) {
                 $va_result['copyright_holder'] = $vs_copyright_holder;
             }
             // include urls for reference img
             $va_objects = $t_object->getRelatedItems('ca_objects', array('restrictToRelationshipTypes' => 'reference'));
             if (!is_array($va_objects) || sizeof($va_objects) != 1) {
                 continue;
             }
             $va_object = array_shift($va_objects);
             $t_rel_object = new ca_objects($va_object['object_id']);
             $va_rep = $t_rel_object->getPrimaryRepresentation(array('preview170', 'medium', 'alhalqa1000', 'alhalqa2000'));
             if (!is_array($va_rep) || !is_array($va_rep['urls'])) {
                 continue;
             }
             $va_result['reference_image_urls'] = $va_rep['urls'];
         }
         if ($this->opo_request->getParameter('sort', pString) == 'likes') {
             if (strtolower($this->opo_request->getParameter('sortDirection', pString)) == 'asc') {
                 usort($va_return['results'], function ($a, $b) {
                     return $a['likes'] - $b['likes'];
                 });
             } else {
                 // default is desc
                 usort($va_return['results'], function ($a, $b) {
                     return $b['likes'] - $a['likes'];
                 });
             }
         }
     }
     return $va_return;
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:49,代码来源:AlhalqaSearchService.php

示例4: _renderMediaView

 /**
  * Returns content for overlay containing details for object representation
  */
 private function _renderMediaView($ps_view_name, $ps_media_context)
 {
     $pn_object_id = $this->request->getParameter('object_id', pInteger);
     $pn_representation_id = $this->request->getParameter('representation_id', pInteger);
     $pn_year = $this->request->getParameter('year', pInteger);
     $this->view->setVar("year", $pn_year);
     $va_periods = $this->ops_periods;
     $this->view->setVar('object_id', $pn_object_id);
     $t_object = new ca_objects($pn_object_id);
     # --- get caption and photocredit
     $this->view->setVar("caption", $t_object->get("description"));
     $this->view->setVar("photographer", $t_object->get("provenance"));
     $t_rep = new ca_object_representations($pn_representation_id);
     $this->view->setVar('representation_id', $pn_representation_id);
     $this->view->setVar('t_object_representation', $t_rep);
     if ($this->request->config->get("dont_enforce_access_settings")) {
         $va_access_values = array();
     } else {
         $va_access_values = caGetUserAccessValues($this->request);
     }
     if (!$t_object->getPrimaryKey()) {
         die("Invalid object_id");
     }
     if (!$t_rep->getPrimaryKey()) {
         die("Invalid representation_id");
     }
     if (sizeof($va_access_values) && !in_array($t_object->get('access'), $va_access_values)) {
         die("Invalid object_id");
     }
     if (sizeof($va_access_values) && !in_array($t_rep->get('access'), $va_access_values)) {
         die("Invalid rep_id");
     }
     $this->view->setVar('t_display_rep', $t_rep);
     // Get media for display using configured rules
     $va_rep_display_info = caGetMediaDisplayInfo($ps_media_context, $t_rep->getMediaInfo('media', 'INPUT', 'MIMETYPE'));
     // set version
     $this->view->setVar('display_version', $va_rep_display_info['display_version']);
     // set other options
     $this->view->setVar('display_options', $va_rep_display_info);
     // Get all representation as icons for navigation
     # --- do a search for all chronology image objects
     # --- determine the period from the year
     foreach ($va_periods as $i => $va_per_info) {
         if ($pn_year >= $va_per_info["start"] && $pn_year <= $va_per_info["end"]) {
             $vn_period = $i;
             break;
         }
     }
     # --- what is year to search by?
     $vn_y = "";
     if ($va_periods[$vn_period]["displayAllYears"] == 1) {
         $vn_y = $va_periods[$vn_period]["start"] . "-" . $va_periods[$vn_period]["end"];
     } else {
         $vn_y = $pn_year;
     }
     # --- get type is for chron images
     $t_list = new ca_lists();
     $vn_chron_images_type_id = $t_list->getItemIDFromList('object_types', 'chronology_image');
     $o_obj_search = new ObjectSearch();
     $qr_chron_images = $o_obj_search->search("ca_objects.access:1 AND ca_objects.date.parsed_date:\"" . $vn_y . "\" AND ca_objects.type_id:{$vn_chron_images_type_id}", array("sort" => "ca_objects.date.parsed_date", "no_cache" => !$this->opb_cache_searches));
     $va_thumbnails = array();
     if ($qr_chron_images->numHits() > 0) {
         $t_image_objects = new ca_objects();
         $i = 1;
         while ($qr_chron_images->nextHit()) {
             $t_image_objects->load($qr_chron_images->get("ca_objects.object_id"));
             if ($t_primary_rep = $t_image_objects->getPrimaryRepresentationInstance()) {
                 $va_temp = array();
                 if (!sizeof($va_access_values) || in_array($t_primary_rep->get('access'), $va_access_values)) {
                     $va_temp["representation_id"] = $t_primary_rep->get("representation_id");
                     $va_temp["rep_icon"] = $t_primary_rep->getMediaTag('media', 'icon');
                     $va_temp["rep_tiny"] = $t_primary_rep->getMediaTag('media', 'tinyicon');
                     $va_temp["object_id"] = $qr_chron_images->get("ca_objects.object_id");
                     $va_thumbnails[$qr_chron_images->get("ca_objects.object_id")] = $va_temp;
                     if ($vn_getNext == 1) {
                         $this->view->setVar("next_object_id", $qr_chron_images->get("object_id"));
                         $this->view->setVar("next_representation_id", $t_primary_rep->get("representation_id"));
                         $vn_getNext = 0;
                     }
                     if ($qr_chron_images->get("object_id") == $pn_object_id) {
                         $this->view->setVar("representation_index", $i);
                         $this->view->setVar("previous_object_id", $vn_prev_obj_id);
                         $this->view->setVar("previous_representation_id", $vn_prev_rep_id);
                         $vn_getNext = 1;
                     }
                     $vn_prev_obj_id = $qr_chron_images->get("object_id");
                     $vn_prev_rep_id = $t_primary_rep->get("representation_id");
                     $i++;
                 }
             }
         }
     }
     $this->view->setVar('reps', $va_thumbnails);
     return $this->render("Chronology/{$ps_view_name}.php");
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:98,代码来源:ChronologyController.php

示例5: end

         $vn_highest_level = end($vn_parent_ids);
         $t_top_level = new ca_collections($vn_highest_level);
         $vs_collection_link = "<p>" . caNavLink($this->request, $t_top_level->get('ca_collections.preferred_labels'), '', 'Detail', 'collections', $vn_highest_level) . "</p>";
     }
 }
 if ($vs_table == 'ca_objects') {
     if ($qr_res->get('ca_objects.type_id') == 25) {
         $va_icon = "<i class='glyphicon glyphicon-volume-up'></i>";
     } elseif ($qr_res->get('ca_objects.type_id') == 26) {
         $va_icon = "<i class='glyphicon glyphicon-film'></i>";
     } elseif ($qr_res->get('ca_objects.type_id') == 30 && !$qr_res->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values))) {
         $va_icon = "<i class='glyphicon glyphicon-book'></i>";
     } elseif ($qr_res->get('ca_objects.type_id') == 1903) {
         $vn_parent_id = $qr_res->get('ca_objects.parent_id');
         $t_copy = new ca_objects($vn_parent_id);
         if (!$t_copy->get('ca_object_representations.media.medium', array('checkAccess' => $va_access_values))) {
             $va_icon = "<i class='glyphicon glyphicon-book'></i>";
         } else {
             $va_icon = "";
         }
     } elseif ($qr_res->get('ca_objects.type_id') == 23 && !$qr_res->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values))) {
         $va_icon = "<i class='fa fa-archive'></i>";
     } elseif ($qr_res->get('ca_objects.type_id') == 24 && !$qr_res->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values))) {
         $va_icon = "<i class='fa fa-archive'></i>";
     } elseif ($qr_res->get('ca_objects.type_id') == 27 && !$qr_res->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values))) {
         $va_icon = "<i class='fa fa-archive'></i>";
     } else {
         $va_icon = "";
     }
     if ($qr_res->get('ca_objects.type_id') == 1903) {
         $vs_rep_detail_link = caDetailLink($this->request, $va_icon . $t_copy->get('ca_object_representations.media.medium', array('checkAccess' => $va_access_values)), '', $vs_table, $vn_parent_id);
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:browse_results_images_html.php

示例6: testChildrenGet

 public function testChildrenGet()
 {
     $t_object = new ca_objects();
     $this->assertTrue($t_object->load(array('idno' => $this->ops_object_idno)), "Could not load test record");
     //
     // Get intrinsic field from children
     //
     $vs_value = 'CIHP.TEST.1; CIHP.TEST.2';
     $va_val = $t_object->get('ca_objects.children.idno', array('returnAsArray' => false, 'returnAllLocales' => false, 'delimiter' => '; '));
     $this->assertInternalType("string", $va_val, "Returned value should be string");
     $this->assertEquals($vs_value, $va_val, "Returned value is incorrect");
     $vs_value = 'CIHP.TEST.1';
     $va_val = $t_object->get('ca_objects.children.idno', array('returnAsArray' => true, 'returnAllLocales' => false));
     $this->assertInternalType("array", $va_val, "Returned value should be array");
     $this->assertGreaterThan(0, sizeof($va_val), "Size of returned array should be greater than 0");
     $this->assertContains($vs_value, $va_val, "Value in array is incorrect");
     $va_val = $t_object->get('ca_objects.children.idno', array('returnAsArray' => true, 'returnAllLocales' => true));
     $this->assertInternalType("array", $va_val, "Returned value should be array");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Second level of returned value should be array");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Third level of returned value should be array");
     $va_val = array_shift($va_val);
     $this->assertContains($vs_value, $va_val, "Value in array is incorrect");
     //
     // Get preferred labels from children
     //
     $vs_value = 'Canonical test sub-record No. 1; Canonical test sub-record No. 2';
     $va_val = $t_object->get('ca_objects.children.preferred_labels.name', array('returnAsArray' => false, 'returnAllLocales' => false, 'delimiter' => '; '));
     $this->assertInternalType("string", $va_val, "Returned value should be string");
     $this->assertEquals($vs_value, $va_val, "Returned value is incorrect");
     $va_val = $t_object->get('ca_objects.children.preferred_labels.name', array('returnAsArray' => true, 'returnAllLocales' => false));
     $this->assertInternalType("array", $va_val, "Returned value should be array");
     $this->assertGreaterThan(0, sizeof($va_val), "Size of returned array should be greater than 0");
     $vs_value = 'Canonical test sub-record No. 1';
     $this->assertContains($vs_value, $va_val, "Value in array is incorrect");
     $va_val = $t_object->get('ca_objects.children.preferred_labels.name', array('returnAsArray' => true, 'returnAllLocales' => true));
     $this->assertInternalType("array", $va_val, "Returned value should be array");
     $this->assertGreaterThan(0, sizeof($va_val), "Size of returned array should be greater than 0");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Second level of returned value should be array");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Third level of returned value should be array");
     $this->assertContains($vs_value, $va_val, "Value in array is incorrect");
     //
     // Get attributes from children
     //
     $va_val = $t_object->get('ca_objects.children.description', array('returnAsArray' => false, 'returnAllLocales' => false));
     $this->assertInternalType("string", $va_val, "Returned value should be string");
     $va_val = $t_object->get('ca_objects.children.description', array('returnAsArray' => true, 'returnAllLocales' => false));
     $this->assertInternalType("array", $va_val, "Returned value should be array");
     $this->assertGreaterThan(0, sizeof($va_val), "Size of returned array should greater than 0");
     $this->assertArrayHasKey('description', $va_tmp = array_shift($va_val), "Returned array should have key 'description'");
     $va_val = $t_object->get('ca_objects.children.description', array('returnAsArray' => true, 'returnAllLocales' => true));
     $this->assertInternalType("array", $va_val, "Returned value should be array");
     $this->assertGreaterThan(0, sizeof($va_val), "Size of returned array should be greater than 0");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Second level of returned value should be array");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Third level of returned value should be array");
     $va_val = array_shift($va_val);
     $this->assertInternalType("array", $va_val, "Fourth level of returned value should be array");
     $this->assertArrayHasKey('description', $va_val, "Returned array should have key 'description'");
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:64,代码来源:ModelTest.php

示例7: array

	

		</div><!-- end col 12-->
	</div><!-- end row -->
	<div class="row">
		<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>
			<div class="row">
<?php 
    $va_related_artworks = $t_item->get('ca_objects.object_id', array('checkAccess' => caGetUserAccessValues($this->request), 'returnAsArray' => true));
    foreach ($va_related_artworks as $vn_id => $va_related_artwork) {
        $t_object = new ca_objects($va_related_artwork);
        $va_reps = $t_object->getPrimaryRepresentation(array('versions' => 'medium'), null, array("checkAccess" => $va_access_values, 'scaleCSSHeightTo' => '260px', 'scaleCSSWidthTo' => '220px'));
        print "<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6 relatedLoan'>";
        print "<div class='loanImg'>" . caNavLink($this->request, $va_reps['tags']['medium'], '', '', 'Detail', 'artworks/' . $va_related_artwork) . "</div>";
        print "<div class='lotCaption'>";
        print "<p>" . caNavLink($this->request, $t_object->get('ca_entities.preferred_labels', array('restrictToRelationshipTypes' => array('artist'))), '', '', 'Detail', 'artworks/' . $va_related_artwork) . "</p>";
        print "<p>" . caNavLink($this->request, "<i>" . $t_object->get('ca_objects.preferred_labels') . "</i>, " . $t_object->get('ca_objects.creation_date'), '', '', 'Detail', 'artworks/' . $va_related_artwork) . "</p>";
        print "<p>" . $t_object->get('ca_objects.medium') . "</p>";
        print "<p>" . $t_object->get('ca_objects.dimensions.display_dimensions') . "</p>";
        if ($this->request->user->hasUserRole("founders_new") || $this->request->user->hasUserRole("admin") || $this->request->user->hasUserRole("curatorial_all_new") || $this->request->user->hasUserRole("curatorial_basic_new") || $this->request->user->hasUserRole("archives_new") || $this->request->user->hasUserRole("library_new")) {
            print "<p>" . $t_object->get('ca_objects.idno') . "</p>";
        }
        print "</div><!-- end lotCaption -->";
        print "</div>";
    }
    ?>
				

			</div><!-- end row -->	
		</div><!-- end col 6-->		
		<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6'>				
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:29,代码来源:ca_object_lots_default_html.php

示例8: array

     $va_related_objects = $qr_res->get('ca_objects.object_id', array('returnAsArray' => true));
     $va_first_object_id = $va_related_objects[0];
     $t_object = new ca_objects($va_first_object_id);
     $va_rep = $t_object->get('ca_object_representations.media.small');
     if ($t_object->get('ca_object_representations.media.small')) {
         $va_cell_width = "style='width:auto'";
         #$va_cell_width = "style='width:".$t_object->get('ca_object_representations.media.small.width')."px;'";
     } else {
         $va_cell_width = "style='width:180px;'";
     }
 } else {
     if ($vs_table == "ca_collections") {
         $va_related_objects = $qr_res->get('ca_objects.object_id', array('returnAsArray' => true));
         $va_first_object_id = $va_related_objects[0];
         $t_object = new ca_objects($va_first_object_id);
         $va_rep = $t_object->get('ca_object_representations.media.small');
         if ($t_object->get('ca_object_representations.media.small')) {
             $va_cell_width = "style='width:auto'";
             #$va_cell_width = "style='width:".$t_object->get('ca_object_representations.media.small.width')."px;'";
         } else {
             $va_cell_width = "style='width:180px;'";
         }
     } else {
         $va_rep = $qr_res->get('ca_object_representations.media.small');
         if ($qr_res->get('ca_object_representations.media.small')) {
             $va_cell_width = "style='width:auto'";
             #$va_cell_width = "style='width:".$qr_res->get('ca_object_representations.media.small.width')."px;'";
         } else {
             $va_cell_width = "style='width:180px;'";
         }
     }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:31,代码来源:browse_results_images_html.php

示例9: Index

 public function Index()
 {
     $va_participate_ids = array();
     $t_participate = new ca_sets();
     # --- participate set - set name assigned in eastend.conf - plugin conf file
     $t_participate->load(array('set_code' => $this->opo_plugin_config->get('participate_set_name')));
     # Enforce access control on set
     if (sizeof($this->opa_access_values) == 0 || sizeof($this->opa_access_values) && in_array($t_participate->get("access"), $this->opa_access_values)) {
         $this->view->setVar('participate_set_id', $t_participate->get("set_id"));
         $va_participate_ids = array_keys(is_array($va_tmp = $t_participate->getItemRowIDs(array('checkAccess' => $this->opa_access_values, 'shuffle' => 1))) ? $va_tmp : array());
         // These are the entity ids in the set
     }
     # --- loop through featured ids and grab the object's image
     $t_object = new ca_objects();
     $va_participate_images = array();
     foreach ($va_participate_ids as $vn_participate_object_id) {
         $va_tmp = array();
         $t_object->load($vn_participate_object_id);
         $va_tmp["object_id"] = $vn_participate_object_id;
         $va_image = $t_object->getPrimaryRepresentation(array("mediumlarge"));
         # --- don't show records with status ars/vaga don't show image
         if ($t_object->get("ca_objects.object_status") != 348) {
             if ($t_object->get("ca_objects.object_status") == 349) {
                 $va_tmp["vaga_class"] = "vagaDisclaimer";
             }
             $va_tmp["image"] = $va_image["tags"]["mediumlarge"];
             $va_tmp["caption"] = $t_object->get("ca_objects.caption");
             $va_tmp["title"] = $t_object->getLabelForDisplay();
         }
         $va_participate_images[$vn_participate_object_id] = $va_tmp;
     }
     $this->view->setVar("participate_images", $va_participate_images);
     $this->render('participate_html.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:34,代码来源:ParticipateController.php

示例10: foreach

$t_featured = new ca_sets();
$t_featured->load(array('set_code' => 'featuredSet'));
$va_set_items = $t_featured->getItems();
?>

<div id="featuredSlideshow">

	<div class='blockTitle'>Featured Items</div>
	<div class='blockFeatured scrollBlock' >
		<div class='scrollingDiv'><div class='scrollingDivContent'>
<?php 
foreach ($va_set_items as $va_set_id => $va_set_item_a) {
    foreach ($va_set_item_a as $va_set_item_id => $va_set_item) {
        $va_object_id = $va_set_item['row_id'];
        $t_object = new ca_objects($va_object_id);
        $va_image_width = $t_object->get('ca_object_representations.media.mediumlarge.width');
        print "<div class='featuredObject' style='width:{$va_image_width}px;'>";
        print "<div class='featuredObjectImg'>";
        print caNavLink($this->request, $t_object->get('ca_object_representations.media.mediumlarge'), '', '', 'Detail', 'objects/' . $va_object_id);
        print "</div>";
        print "<div class='artwork'>";
        print $va_set_item['caption'];
        print "</div>";
        print "</div>";
    }
}
?>
		</div><!-- scrollingDivContent --></div><!-- scrollingdiv -->
	</div><!-- block Featured -->
	
	<div class='clearfix'></div>
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:featured_items_html.php

示例11: array

			
<?php 
        $vn_count = 0;
        $t_object = new ca_objects($vn_object_id);
        $thumb_rep = $t_object->getPrimaryRepresentation(array('preview'));
        // Skip first few columns as needed
        if ($vn_count < $vn_start) {
            $vn_count++;
            continue;
        }
        if ($tr_count == 0) {
            print "<tr>";
        }
        $vs_display_value = $t_display->getDisplayValue($vo_result, $vn_placement_id, array('forReport' => true, 'purify' => true));
        print "<td valign='bottom' align='center' width='100'><table cellpadding='0' cellspacing='0' width='100' height='100%' align='center' border='0'><tr align='center' border='0' valign='middle'><td align='center' border='0' valign='middle' style='text-align:center;'>" . $thumb_rep["tags"]["preview"];
        print "</td></tr><tr valign='bottom' align='center'><td nowrap='wrap' border='0' align='center' style='word-wrap: break-word; width: 150px; background-color:#eee;' border='1px solid #ccc;'>" . $t_object->get('ca_objects.preferred_labels') . "<br/>" . $t_object->get('ca_objects.idno') . "<br/>" . $t_object->get('ca_collections.preferred_labels');
        print "</td></tr></table></td>";
        $vn_count++;
        if ($tr_count == 4) {
            print "</tr>";
            $tr_count = 0;
        } else {
            $tr_count++;
        }
        if ($vn_count >= $vn_start + 6) {
            break;
        }
        ?>
	
		 	
<?php 
开发者ID:guaykuru,项目名称:pawtucket,代码行数:30,代码来源:ca_objects_pdf_results_thumb_html.php

示例12: Db

				</div>
<?php 
if (!$this->request->config->get('dont_allow_registration_and_login')) {
    ?>
				
				<div class="dontmiss noh2 yellowbar">
					<h1><a href="local-studies.html">My Favourites</a></h1>
<?php 
    if ($this->request->isLoggedIn()) {
        # --- get the last item added to the users sets
        $o_db = new Db();
        $qr_set_item = $o_db->query("\n\t\t\t\t\t\t\t\tSELECT csi.row_id\n\t\t\t\t\t\t\t\tFROM ca_sets cs\n\t\t\t\t\t\t\t\tINNER JOIN ca_set_items AS csi ON cs.set_id = csi.set_id\n\t\t\t\t\t\t\t\tWHERE cs.user_id = ?\n\t\t\t\t\t\t\t\tORDER BY csi.item_id DESC\n\t\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\t", $this->request->getUserID());
        if ($qr_set_item->numRows() > 0) {
            while ($qr_set_item->nextRow()) {
                $t_lastSetObject = new ca_objects($qr_set_item->get("row_id"));
                if (in_array($t_lastSetObject->get("access"), $va_access_values)) {
                    $vn_lastSetObjectId = $qr_set_item->get("row_id");
                    $vs_lastSetObjectLabel = $t_lastSetObject->get("preferred_labels");
                    $va_reps = $t_lastSetObject->getPrimaryRepresentation(array('icon'), null, array('return_with_access' => $va_access_values));
                    $vs_lastSetObjectIcon = $va_reps["tags"]["icon"];
                    $vs_lastSetObjectIconLink = caNavLink($this->request, $vs_lastSetObjectIcon, '', 'Detail', 'Object', 'Show', array('object_id' => $vn_lastSetObjectId));
                }
            }
        }
        if ($vs_lastSetObjectIconLink) {
            print $vs_lastSetObjectIconLink;
        } else {
            print '<a href="local-studies.html"><img src="' . $this->request->getThemeUrlPath() . '/graphics/bookicon.jpg" alt="" title="" /></a>';
        }
        ?>
							<p>Click <?php 
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:pageHeader.php

示例13: join

        }
        ?>
						</div>
<?php 
        if ($va_item['idno']) {
            $va_title[] = '<span class="resultidno">' . $va_item['idno'] . "</span>";
        }
        if ($va_item['name']) {
            if (unicode_strlen($va_item['name']) > 70) {
                $va_title[] = '<em>' . unicode_substr($va_item['name'], 0, 67) . '...</em>';
            } else {
                $va_title[] = '<em>' . $va_item['name'] . '</em>';
            }
        }
        $t_set_item->load($va_item['row_id']);
        if ($t_set_item->get("ca_objects.date.display_date")) {
            $va_title[] = $t_set_item->get("ca_objects.date.display_date");
        }
        if ($t_set_item->get("ca_objects.technique")) {
            $va_title[] = $t_set_item->get("ca_objects.technique");
        }
        $vs_caption = join('<br/>', $va_title);
        ?>
						
						<div id='caption<?php 
        print $vn_item_id;
        ?>
' class='setItemCaption'><?php 
        print caNavLink($this->request, $vs_caption, '', 'Detail', 'Object', 'Show', array('object_id' => $va_item['row_id']));
        ?>
</div>
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:sets_html.php

示例14: foreach

?>
	<div id="featuredHeader">Featured Objects</div>
	<div class="textContent">
<?php 
print $this->render('Favorites/favorites_intro_text_html.php');
?>
	</div><!-- end textContent -->
	<div class="favoritesColumn" id="featuredCol">
			<div id="scrollFeatured">
				<div id="scrollFeaturedContainer">
<?php 
$vn_featured_count = 0;
if (is_array($this->getVar("featured")) && sizeof($this->getVar("featured")) > 0) {
    foreach ($this->getVar("featured") as $vn_object_id => $vs_thumb) {
        if ($vn_featured_count <= 4) {
            $va_featured_desc = $t_object->get("ca_objects.description");
            $va_featured_description = substr($va_featured_desc, 0, 485);
            ?>
		<div id="featuredWrapper">
			<div id="featuredImage"><table><tr><td><?php 
            print caNavLink($this->request, $vs_thumb, '', 'Detail', 'Object', 'Show', array('object_id' => $vn_object_id));
            ?>
</td></tr></table></div><div id="featuredText"><div id="featuredTextTitle"><?php 
            print $vs_featured_content_label;
            ?>
</div>
				<?php 
            print $va_featured_description;
            if (strlen($va_featured_desc) > 480) {
                print "...";
            }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:favorites_landing_html.php

示例15: elseif

            $vs_caption = $vs_label_artist . $vs_label_detail_link . $vs_collection_link . $vs_type_link . $vs_date_link . $vs_art_idno_link . $vs_library_info . $vs_deaccessioned;
            if ($q_set_items->get('ca_objects.type_id') == 25) {
                $va_icon = "<i class='glyphicon glyphicon-volume-up'></i>";
            } elseif ($q_set_items->get('ca_objects.type_id') == 26) {
                $va_icon = "<i class='glyphicon glyphicon-film'></i>";
            } elseif ($q_set_items->get('ca_objects.type_id') == 1903) {
                $vn_parent_id = $q_set_items->get('ca_objects.parent_id');
                $t_copy = new ca_objects($vn_parent_id);
            } else {
                $va_icon = "";
            }
            if ($va_icon && ($q_set_items->get('ca_objects.type_id') == 25 || !$q_set_items->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values)))) {
                $va_icon = "<div class='lbSetImgPlaceholder'>" . $va_icon . "</div>";
            }
            if ($q_set_items->get('ca_objects.type_id') == 1903) {
                $vs_rep = $va_icon . $t_copy->get('ca_object_representations.media.medium', array('checkAccess' => $va_access_values));
                #$vs_rep_detail_link 	= caDetailLink($this->request, $va_icon.$t_copy->get('ca_object_representations.media.medium', array('checkAccess' => $va_access_values)), '', $vs_table, $vn_parent_id);
            } elseif ($q_set_items->get('ca_objects.type_id') == 25) {
                $vs_rep = $va_icon;
                #$vs_rep_detail_link 	= caDetailLink($this->request, $va_icon, '', $vs_table, $vn_id);
            } else {
                $vs_rep = $va_icon . $q_set_items->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values));
                #$vs_rep_detail_link 	= caDetailLink($this->request, $va_icon.$q_set_items->getMediaTag('ca_object_representations.media', 'medium', array('checkAccess' => $va_access_values)), '', $vs_table, $vn_id);
            }
            print "<div class='col-xs-6 col-sm-4 col-md-3 col-lg-3 lbItem" . $t_set_item->get("item_id") . "' id='row-" . $q_set_items->get("object_id") . "'><div class='lbItemContainer'>";
            print caLightboxSetDetailItem($this->request, $q_set_items->get('ca_objects.type_id') == 1903 ? $t_copy : $q_set_items, $t_set_item, array("write_access" => $vb_write_access, "caption" => $vs_caption, "representation" => $vs_rep));
            print "</div></div><!-- end col 3 -->";
            $vn_c++;
        }
    }
} else {
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:31,代码来源:set_detail_thumbnail_html.php


注:本文中的ca_objects::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。