/**
  * Given a ZurmoConfigurationForm, save the configuration global values.
  */
 public static function setConfigurationFromForm(ZurmoConfigurationForm $form)
 {
     ZurmoConfigurationUtil::setByModuleName('ZurmoModule', 'applicationName', $form->applicationName);
     Yii::app()->timeZoneHelper->setGlobalValue((string) $form->timeZone);
     Yii::app()->pagination->setGlobalValueByType('listPageSize', (int) $form->listPageSize);
     Yii::app()->pagination->setGlobalValueByType('subListPageSize', (int) $form->subListPageSize);
     Yii::app()->pagination->setGlobalValueByType('modalListPageSize', (int) $form->modalListPageSize);
     Yii::app()->pagination->setGlobalValueByType('dashboardListPageSize', (int) $form->dashboardListPageSize);
     ZurmoConfigurationUtil::setByModuleName('ZurmoModule', 'gamificationModalNotificationsEnabled', (bool) $form->gamificationModalNotificationsEnabled);
     ZurmoConfigurationUtil::setByModuleName('ZurmoModule', 'realtimeUpdatesEnabled', (bool) $form->realtimeUpdatesEnabled);
     AutoresponderOrCampaignBatchSizeConfigUtil::setBatchSize((int) $form->autoresponderOrCampaignBatchSize);
     UnsubscribeAndManageSubscriptionsPlaceholderUtil::setContentByType($form->autoresponderOrCampaignFooterPlainText, false);
     UnsubscribeAndManageSubscriptionsPlaceholderUtil::setContentByType($form->autoresponderOrCampaignFooterRichText, true);
     self::setLogoAttributes($form);
 }
 /**
  * @depends testTextContentGetsCustomFooterAppended
  */
 public function testHtmlContentGetsCustomFooterAppended()
 {
     UnsubscribeAndManageSubscriptionsPlaceholderUtil::setContentByType('RichTextFooter', true);
     $content = 'This is some html content';
     $result = static::resolveContent($content, true, true);
     $this->assertTrue($result);
     $this->assertTrue(strpos($content, 'This is some html content') !== false);
     $this->assertTrue(strpos($content, 'RichTextFooter') !== false);
     $this->assertTrue(strpos($content, '/marketingLists/external/') === false);
 }
 /**
  * @depends testGetByContentTypeReturnsDefaultWithNoneSet
  */
 public function testSetByContentType()
 {
     UnsubscribeAndManageSubscriptionsPlaceholderUtil::setContentByType('plain', false);
     $plainTextFooter = UnsubscribeAndManageSubscriptionsPlaceholderUtil::getContentByType(false);
     $this->assertNotNull($plainTextFooter);
     $this->assertEquals('plain', $plainTextFooter);
     UnsubscribeAndManageSubscriptionsPlaceholderUtil::setContentByType('rich', true);
     $richTextFooter = UnsubscribeAndManageSubscriptionsPlaceholderUtil::getContentByType(true);
     $this->assertNotNull($richTextFooter);
     $this->assertEquals('rich', $richTextFooter);
 }