/** * @param SyndicationDistributionProfile $object_to_fill * @param array $props_to_skip * @return SyndicationDistributionProfile */ public function toUpdatableObject($object_to_fill, $props_to_skip = array()) { if (is_null($object_to_fill)) { $object_to_fill = new SyndicationDistributionProfile(); } kSyndicationFeedManager::validateXsl($this->xsl); return parent::toUpdatableObject($object_to_fill, $props_to_skip); }
/** * Update Distribution Profile by id * * @action update * @param int $id * @param KalturaDistributionProfile $distributionProfile * @return KalturaDistributionProfile * @throws ContentDistributionErrors::DISTRIBUTION_PROFILE_NOT_FOUND */ function updateAction($id, KalturaDistributionProfile $distributionProfile) { $dbDistributionProfile = DistributionProfilePeer::retrieveByPK($id); if (!$dbDistributionProfile) { throw new KalturaAPIException(ContentDistributionErrors::DISTRIBUTION_PROFILE_NOT_FOUND, $id); } if ($distributionProfile->name !== null) { $distributionProfile->validatePropertyMinLength("name", 1); } $distributionProfile->toUpdatableObject($dbDistributionProfile); $dbDistributionProfile->save(); $distributionProfile = KalturaDistributionProfileFactory::createKalturaDistributionProfile($dbDistributionProfile->getProviderType()); $distributionProfile->fromObject($dbDistributionProfile); return $distributionProfile; }