Skip to content
Snippets Groups Projects
Select Git revision
  • 80a8a75ea6070650b86d4f6aa008bfb65b22f513
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

DataFieldTextmarkupEntry.class.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    DataFieldTextmarkupEntry.class.php 876 B
    <?php
    
    /**
     * @author  Elmar Ludwig <elmar.ludwig@uos.de>
     * @license GPL2 or any later version
     */
    class DataFieldTextmarkupEntry extends DataFieldTextareaEntry
    {
        protected $template = 'textmarkup.php';
    
        /**
         * Sets the value from a post request
         *
         * @param mixed $submitted_value The value from request
         */
        public function setValueFromSubmit($submitted_value)
        {
            $this->setValue(Studip\Markup::purifyHtml($submitted_value));
        }
    
        /**
         * Returns the display/rendered value of this datafield
         *
         * @param bool $entities Should html entities be encoded (defaults to true)
         * @return String containg the rendered value
         */
        public function getDisplayValue($entities = true)
        {
            if ($entities) {
                return formatReady($this->getValue());
            }
    
            return $this->getValue();
        }
    }