public function populateFromObject($object, $add_underscore = true) { /* @var Kaltura_Client_FtpDistribution_Type_FtpDistributionProfile $object */ parent::populateFromObject($object, $add_underscore); $this->addItemXpathsToExtend($object->itemXpathsToExtend); $entryFields = array_keys($this->getEntryFields()); $metadataXpaths = array_keys($this->getMetadataFields()); $fieldConfigArray = $object->fieldConfigArray; $this->setDefault('sftp_public_key_readonly', $object->sftpPublicKey); $this->setDefault('sftp_private_key_readonly', $object->sftpPrivateKey); $this->setDefault('aspera_public_key_readonly', $object->asperaPublicKey); $this->setDefault('aspera_private_key_readonly', $object->asperaPrivateKey); //in edit mode of the form $this->getElement('protocol')->setAttrib('disabled', true); foreach ($fieldConfigArray as $fieldConfig) { if (!isset($fieldConfig->updateParams[0]) || !isset($fieldConfig->updateParams[0]->value)) { continue; } $field = $fieldConfig->updateParams[0]->value; $index = array_search($field, $entryFields); if ($index !== false) { $this->setDefault("update_required_entry_fields_{$index}", true); } $index = array_search($field, $metadataXpaths); if ($index !== false) { $this->setDefault("update_required_metadata_xpaths_{$index}", true); } } }
public function populateFromObject($object, $add_underscore = true) { $this->tvinciElements(); parent::populateFromObject($object, $add_underscore); if ($object->xsltFile) { $this->getElement('xsltFileText')->setValue(json_encode($object->xsltFile)); } }
public function populateFromObject($object, $add_underscore = true) { $this->_sort(); $order = $this->_order[self::FORM_PLACEHOLDER_ELEMENT_ID]; $this->resetOrderOfLastElements(); /** @var $object Kaltura_Client_TvinciDistribution_Type_TvinciDistributionProfile */ $this->layoutForm($order++); parent::populateFromObject($object, $add_underscore); }
public function populateFromObject($object, $add_underscore = true) { parent::populateFromObject($object, $add_underscore); $this->setDefault('aspera_public_key_readonly', $object->asperaPublicKey); $this->setDefault('aspera_private_key_readonly', $object->asperaPrivateKey); $additionalCategories = array(); foreach ($object->seriesAdditionalCategories as $category) { $additionalCategories[] = $category->value; } $this->setDefault('series_additional_categories', $additionalCategories); }
public function populateFromObject($object, $add_underscore = true) { parent::populateFromObject($object, $add_underscore); $xml = "<items>\r\n"; foreach ($object->cPlatformTvSeries as $keyVal) { $xml .= "\t<item>\r\n"; $xml .= "\t\t<key>" . htmlentities($keyVal->key) . "</key>\r\n"; $xml .= "\t\t<value>" . htmlentities($keyVal->value) . "</value>\r\n"; $xml .= "\t</item>\r\n"; } $xml .= "</items>"; $this->setDefault('cplatform_xml', $xml); }
public function populateFromObject($object, $add_underscore = true) { $this->_sort(); $order = $this->_order[self::FORM_PLACEHOLDER_ELEMENT_ID]; $this->resetOrderOfLastElements(); /** @var $object Kaltura_Client_YouTubeDistribution_Type_YouTubeDistributionProfile */ if ($object->feedSpecVersion == Kaltura_Client_YouTubeDistribution_Enum_YouTubeDistributionFeedSpecVersion::VERSION_2) { $this->setV2Mode($order++); } else { $this->setV1Mode($order++); } parent::populateFromObject($object, $add_underscore); }
public function populateFromObject($object, $add_underscore = true) { parent::populateFromObject($object, $add_underscore); if ($object->replaceGroup) { $this->setDefault('replace_group', 'true'); } else { $this->setDefault('replace_group', 'false'); } if ($object->replaceAirDates) { $this->setDefault('replace_air_dates', 'true'); } else { $this->setDefault('replace_air_dates', 'false'); } }
public function populateFromObject($object, $add_underscore = true) { /* @var Kaltura_Client_CrossKalturaDistribution_Type_CrossKalturaDistributionProfile $object */ parent::populateFromObject($object, $add_underscore); // transform the KalturaStringValue array to a normal array $xpathsArray = array(); foreach ($object->metadataXpathsTriggerUpdate as $xpathStringValue) { $xpathsArray[] = $xpathStringValue->value; } $this->setDefault(self::ELEMENT_METADATA_XPATHS_THAT_TRIGGER_UPDATE, array_unique($xpathsArray)); // transform source/target map fields $this->setDefault(self::ELEMENT_MAP_ACCESS_CONTROL_IDS, json_encode($object->mapAccessControlProfileIds)); $this->setDefault(self::ELEMENT_MAP_CONVERSION_PROFILE_IDS, json_encode($object->mapConversionProfileIds)); $this->setDefault(self::ELEMENT_MAP_METADATA_PROFILE_IDS, json_encode($object->mapMetadataProfileIds)); $this->setDefault(self::ELEMENT_MAP_STORAGE_PROFILE_IDS, json_encode($object->mapStorageProfileIds)); $this->setDefault(self::ELEMENT_MAP_FLAVOR_PARAMS_IDS, json_encode($object->mapFlavorParamsIds)); $this->setDefault(self::ELEMENT_MAP_THUMB_PARAMS_IDS, json_encode($object->mapThumbParamsIds)); $this->setDefault(self::ELEMENT_MAP_CAPTION_PARAMS_IDS, json_encode($object->mapCaptionParamsIds)); }
public function populateFromObject($object, $add_underscore = true) { // save the profile on the form instance because addFlavorParamsFields is called after populateFromObject $this->msnDistributionProfile = $object; parent::populateFromObject($object, $add_underscore); }