예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function generateBooleanRules(TemplateForensics $src)
 {
     $rules = [];
     if ($src->allowsChild($this->p) && $src->isBlock() && !$this->p->closesParent($src)) {
         $rules['createParagraphs'] = true;
     }
     if ($src->closesParent($this->p)) {
         $rules['breakParagraph'] = true;
     }
     return $rules;
 }
 public function generateTargetedRules(TemplateForensics $src, TemplateForensics $trg)
 {
     return $src->isBlock() && $trg->isFormattingElement() ? array('closeParent') : array();
 }
 /**
  * {@inheritdoc}
  */
 public function generateTargetedRules(TemplateForensics $src, TemplateForensics $trg)
 {
     return $src->isBlock() && $trg->isFormattingElement() ? ['fosterParent'] : [];
 }
 /**
  * {@inheritdoc}
  */
 public function generateBooleanRules(TemplateForensics $src)
 {
     return $src->isBlock() ? ['ignoreSurroundingWhitespace' => true] : [];
 }