Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39337

Add html_writer::image() to lib/outputcomponents.php

    Details

    • Testing Instructions:
      Hide

      use it by calling the function as shown:
      html_writer::img('foo.com','Foo',array('title'=>'Foo2'));
      This will result in the following string:
      <img src="foo.com" alt="Foo" title="Foo2"/>

      Show
      use it by calling the function as shown: html_writer::img('foo.com','Foo',array('title'=>'Foo2')); This will result in the following string: <img src="foo.com" alt="Foo" title="Foo2"/>
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Further to the discussion here: https://moodle.org/mod/forum/discuss.php?d=168040#p737385

      It should be relatively simple to add a helper function specifically for images which would be a bit less verbose than using html_writer::empty_tag().

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/May/14