Example #1
0
 /**
  * @since 0.13.0
  *
  * @param string $value
  *
  * @return self
  */
 public function setAlignment($value)
 {
     if (in_array($value, JcTable::getAllowedValues(), true)) {
         $this->alignment = $value;
     }
     return $this;
 }
Example #2
0
 /**
  * @since 0.13.0
  *
  * @param string $value
  *
  * @return self
  */
 public function setAlignment($value)
 {
     if (JcTable::getValidator()->isValid($value)) {
         $alignment = '';
         switch ($value) {
             case JcTable::LEFT:
                 $alignment = JcTable::START;
                 break;
             case JcTable::RIGHT:
                 $alignment = JcTable::END;
                 break;
             case JcTable::JUSTIFY:
                 $alignment = JcTable::CENTER;
                 break;
             default:
                 $alignment = $value;
                 break;
         }
         $this->alignment = $alignment;
     }
     return $this;
 }
 /**
  * @since 0.13.0
  *
  * @param string $value
  *
  * @return self
  */
 public function setAlignment($value)
 {
     if (JcTable::getValidator()->isValid($value) || Jc::getValidator()->isValid($value)) {
         $this->alignment = $value;
     }
     return $this;
 }