Example #1
0
 /**
  * Set section settings
  *
  * @param array $settings
  */
 public function setSettings($settings = null)
 {
     if (!is_null($settings) && is_array($settings)) {
         foreach ($settings as $key => $value) {
             if (is_null($value)) {
                 continue;
             }
             $this->settings->setSettingValue($key, $value);
         }
     }
 }
Example #2
0
 /**
  * Set section style.
  *
  * @param array $style
  * @return void
  */
 public function setStyle($style = null)
 {
     if (!is_null($style) && is_array($style)) {
         $this->style->setStyleByArray($style);
     }
 }
Example #3
0
 /**
  * Set/get break type
  */
 public function testBreakType()
 {
     // Section Settings
     $oSettings = new Section();
     $this->assertNull($oSettings->getBreakType());
     $oSettings->setBreakType('continuous');
     $this->assertEquals('continuous', $oSettings->getBreakType());
     $oSettings->setBreakType();
     $this->assertNull($oSettings->getBreakType());
 }