checkNoMarkupFilters example


  public function validate($toolbar_item, Constraint $constraint) {
    if (!$constraint instanceof FundamentalCompatibilityConstraint) {
      throw new UnexpectedTypeException($constraint, __NAMESPACE__ . '\FundamentalCompatibility');
    }

    $text_editor = $this->createTextEditorObjectFromContext();

    // First: the two fundamental checks against the text format. If any of     // them adds a constraint violation, return early, because it is a     // fundamental compatibility problem.     $this->checkNoMarkupFilters($text_editor->getFilterFormat()$constraint);
    if ($this->context->getViolations()->count() > 0) {
      return;
    }
    $this->checkHtmlRestrictionsAreCompatible($text_editor->getFilterFormat()$constraint);
    if ($this->context->getViolations()->count() > 0) {
      return;
    }

    // Second: ensure that all tags can actually be created.     $this->checkAllHtmlTagsAreCreatable($text_editor$constraint);

    
Home | Imprint | This part of the site doesn't use cookies.