/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); if (isset($this->attributes['width'])) { if ($this->isValidSize($this->attributes['width'])) { $attr->set('width', $this->attributes['width']); } } if (isset($this->attributes['height'])) { if ($this->isValidSize($this->attributes['height'])) { $attr->set('height', $this->attributes['height']); } } if (isset($this->attributes['colspan'])) { if ($this->isValidNumber($this->attributes['colspan'])) { $attr->set('colspan', $this->attributes['colspan']); } } if (isset($this->attributes['rowspan'])) { if ($this->isValidNumber($this->attributes['rowspan'])) { $attr->set('rowspan', $this->attributes['rowspan']); } } if (isset($this->attributes['align'])) { if ($this->isValidAlign($this->attributes['align'])) { $attr->set('align', $this->attributes['align']); } } if (isset($this->attributes['valign'])) { if ($this->isValidValign($this->attributes['valign'])) { $attr->set('valign', $this->attributes['valign']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); if (isset($this->attributes['width'])) { if ($this->isValidSize($this->attributes['width'])) { $attr->set('width', $this->attributes['width']); } } if (isset($this->attributes['height'])) { if ($this->isValidSize($this->attributes['height'])) { $attr->set('height', $this->attributes['height']); } } if (isset($this->attributes['border'])) { if ($this->isValidNumber($this->attributes['border'])) { $attr->set('border', $this->attributes['border']); } } if (isset($this->attributes['cellspacing'])) { if ($this->isValidNumber($this->attributes['cellspacing'])) { $attr->set('cellspacing', $this->attributes['cellspacing']); } } if (isset($this->attributes['cellpadding'])) { if ($this->isValidNumber($this->attributes['cellpadding'])) { $attr->set('cellpadding', $this->attributes['cellpadding']); } } if (isset($this->attributes['align'])) { if ($this->isValidAlign($this->attributes['align'])) { $attr->set('align', $this->attributes['align']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $align = ''; if (isset($this->attributes['justify'])) { $align = 'justify'; } if (isset($this->attributes['left'])) { $align = 'left'; } if (isset($this->attributes['right'])) { $align = 'right'; } if (isset($this->attributes['center'])) { $align = 'center'; } if (!$align && isset($this->attributes['align'])) { if ($this->isValidAlign($this->attributes['align'])) { $align = $this->attributes['align']; } } if ($align) { $attr->set('align', $align); } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); if ($this->attributes['abbr']) { $attr->set('title', $this->attributes['abbr']); } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); if (isset($this->attributes['color'])) { $attr->set('color', $this->attributes['color']); } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $attr->add('class', 'bb_spoiler'); $attr->set('style', 'display: none'); $id = uniqid('xbbcode'); $attr->set('id', $id); return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); if (isset($this->attributes['size'])) { if ($this->isValidFontSize($this->attributes['size'])) { $attr->set('size', $this->attributes['size']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); if (isset($this->attributes['*'])) { if ($this->isValidNumber($this->attributes['*'])) { $attr->set('value', $this->attributes['*']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $face = ''; if (isset($this->attributes['font'])) { $face = $this->attributes['font']; } if (isset($this->attributes['altfont'])) { $face = $this->attributes['altfont']; } if ($face) { $attr->set('face', $face); } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $href = $this->getHref(); if ($href) { $attr->set('href', $href); } if (isset($this->attributes['title'])) { $attr->set('title', $this->attributes['title']); } if (isset($this->attributes['target'])) { if ($this->isValidTarget($this->attributes['target'])) { $attr->set('target', $this->attributes['target']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $attr->set('frameborder', '0'); $attr->set('allowfullscreen', 'allowfullscreen'); $attr->set('width', '560'); $attr->set('height', '315'); $src = $this->getSrc(); if ($src) { $attr->set('src', $src); } if (isset($this->attributes['width'])) { if ($this->isValidSize($this->attributes['width'])) { $attr->set('width', $this->attributes['width']); } } if (isset($this->attributes['height'])) { if ($this->isValidSize($this->attributes['height'])) { $attr->set('height', $this->attributes['height']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $dir = ''; switch (strtolower($this->attributes['bdo'])) { case 'ltr': $dir = 'ltr'; break; case 'rtl': $dir = 'rtl'; break; } if ($dir) { $attr->set('dir', $dir); } if (isset($this->attributes['lang'])) { $attr->set('lang', $this->attributes['lang']); } if (isset($this->attributes['title'])) { $attr->set('title', $this->attributes['title']); } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $src = $this->getSrc(); if ($src) { $attr->set('src', $src); } $alt = ''; if (isset($this->attributes['alt'])) { $alt = $this->attributes['alt']; } if (!$alt && isset($this->attributes['title'])) { $alt = $this->attributes['title']; } $attr->set('alt', $alt); // обязательный if (isset($this->attributes['title'])) { $attr->set('title', $this->attributes['title']); } if (isset($this->attributes['width'])) { if ($this->isValidSize($this->attributes['width'])) { $attr->set('width', $this->attributes['width']); } } if (isset($this->attributes['height'])) { if ($this->isValidSize($this->attributes['height'])) { $attr->set('height', $this->attributes['height']); } } if (isset($this->attributes['border'])) { if ($this->isValidNumber($this->attributes['border'])) { $attr->set('border', $this->attributes['border']); } } return $attr; }
/** * @return Attributes */ protected function getAttributes() { $attr = parent::getAttributes(); $attr->add('class', 'bb_quote'); return $attr; }