E
E
EarthFM2014-05-30 22:43:04
CMS
EarthFM, 2014-05-30 22:43:04

How to implement the output of objects from a function?

How can I get this code out of a function? I wrote echo everywhere in the function, shoved it into the array, nothing helped

$PAGE->set_pagelayout('report');
  $PAGE->set_url('/blocks/studentcabinet/view_debts.php');
  $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
  $PAGE->set_title(get_string('view_debts','block_studentcabinet'));
  $PAGE->navigation->add(get_string('view_debts','block_studentcabinet'), new moodle_url('/blocks/studentcabinet/view_debts.php'), navigation_node::TYPE_CONTAINER);

function public_page($nameLinkPage) {

  echo $PAGE->set_pagelayout('report');
  echo $PAGE->set_url('/blocks/studentcabinet/'. $nameLinkPage. '.php');
  echo $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
  echo $PAGE->set_title(get_string($nameLinkPage,'block_studentcabinet'));
  echo $PAGE->navigation->add(get_string($nameLinkPage,'block_studentcabinet'), new moodle_url('/blocks/studentcabinet/'. $nameLinkPage), navigation_node::TYPE_CONTAINER);


}

public_page('view_archive');//настройка страницы

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
EarthFM, 2014-05-30
@EarthFM

You didn't notice this in the moodle system. If you know how to withdraw, then tell me, I will be grateful

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question