Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      32858

      Description

      1/ the old way - $OUTPUT->single_button($url, $label, ...) which allows single_button object in first param too

      benefits:

      • extremely easy migration from print_single_button() in 1.9
      • easy for new ppl that use code completion in IDEs - type $OUUTPUT ==> then you get list of methods ==> then you get all single_button() parameters and links to advanced usage
      • make methods are optionally possible too

      2/ make factory methods

      $OUTPUT->print(single_button::make($url, $label, ...))

      problems:

      • no code completion possible
      • totally different from 1.9
      • custom OOP style (not in Java or anything else I know)
      • Eloy does not like static methods :-P

      3/ $OUTPUT->button(html_form::make_single_button())
      it has the worst of both worlds

      Please submit more cons and pros as comments

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: