/** * Declares an association between this object and a Organization object. * * @param Organization $v * @return Chart The current object (for fluent API support) * @throws PropelException */ public function setOrganization(Organization $v = null) { if ($v === null) { $this->setOrganizationId(NULL); } else { $this->setOrganizationId($v->getId()); } $this->aOrganization = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the Organization object, it will not be re-added. if ($v !== null) { $v->addChart($this); } return $this; }
/** * Filter the query by a related Organization object * * @param Organization|PropelObjectCollection $organization The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return OrganizationProductQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByOrganization($organization, $comparison = null) { if ($organization instanceof Organization) { return $this->addUsingAlias(OrganizationProductPeer::ORGANIZATION_ID, $organization->getId(), $comparison); } elseif ($organization instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(OrganizationProductPeer::ORGANIZATION_ID, $organization->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByOrganization() only accepts arguments of type Organization or PropelCollection'); } }
/** * Exclude object from result * * @param Organization $organization Object to remove from the list of results * * @return OrganizationQuery The current query, for fluid interface */ public function prune($organization = null) { if ($organization) { $this->addUsingAlias(OrganizationPeer::ID, $organization->getId(), Criteria::NOT_EQUAL); } return $this; }
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * User detail * @author Abhik Chakraborty */ $do_crmfields = new CRMFields(); $do_block = new Block(); $do_block->get_block_by_module($module_id); $module_obj = new Organization(); $module_obj->getId($sqcrm_record_id); //updates detail, just add and last updated $do_crmentity = new CRMEntity(); $update_history = $do_crmentity->get_last_updates($sqcrm_record_id, $module_id, $module_obj); if (isset($_GET['ajaxreq']) && $_GET['ajaxreq'] == true) { require_once 'view/detail_view_entry.php'; } else { require_once 'view/detail_view.php'; }
/** * {@inheritdoc} */ public function jsonSerialize() { $parent = $this->organization->getParent(); return ['id' => $this->organization->getId(), 'name' => $this->organization->getName(), 'parent' => is_null($parent) ? null : $parent->getName()]; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param Organization $obj A Organization object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null OrganizationPeer::$instances[$key] = $obj; } }
/** * Update an organization. * * It is suggested that you use the getOrganization function to retrieve an object to be updated * then from there you can modify it using the set functions, and then provide it to this function * to be updated on the server side. Integrity checks are not made through this library, but * any errors retrieved by the server do raise an Exception. * * @param Organization $org - organisation object * @return bool - based on success of request * @throws Exception - if HTTP request doesn't succeed */ public function postOrganization(Organization $org) { $url = $this->restUrl . ORGANIZATION_BASE_URL . '/' . $org->getId(); if ($this->prepAndSend($url, array(200), 'POST', $org->asXML())) { return true; } return false; }