32 public function makeStickyForm(
string $form_name, array $ignored_field_names = []): void {
35 $default_ignored_field_names = [
38 '_elgg_sticky_form_name',
39 '_elgg_sticky_ignored_fields',
42 $ignored_field_names = array_merge($default_ignored_field_names, $ignored_field_names);
44 $data = $this->session->get(
'sticky_forms', []);
48 $vars = array_merge($req->query->all(), $req->request->all());
49 foreach ($ignored_field_names as
$key) {
55 $this->session->set(
'sticky_forms',
$data);
70 $data = $this->session->get(
'sticky_forms', []);
71 unset(
$data[$form_name]);
73 $this->session->set(
'sticky_forms',
$data);
84 $data = $this->session->get(
'sticky_forms', []);
85 return isset(
$data[$form_name]);
98 public function getStickyValue(
string $form_name,
string $variable =
'',
$default =
null,
bool $filter_result =
true) {
99 $data = $this->session->get(
'sticky_forms', []);
100 if (isset(
$data[$form_name][$variable])) {
102 if ($filter_result) {
121 public function getStickyValues(
string $form_name,
bool $filter_result =
true): array {
122 $data = $this->session->get(
'sticky_forms', []);
123 if (!isset(
$data[$form_name])) {
127 $values =
$data[$form_name];
128 if ($filter_result) {
if(! $entity instanceof \ElggUser) $data
_elgg_services()
Get the global service provider.
if(isset($_COOKIE['elggperm'])) $session
if($container instanceof ElggGroup && $container->guid !=elgg_get_page_owner_guid()) $key