/** * @param repeater|flexible_content|\fewbricks\bricks\brick $object_to_prepare_for * @param $setting */ private function prepare_label_addition($object_to_prepare_for, $setting) { if ('' !== ($field_label_addition = $object_to_prepare_for->get_setting('field_label_' . $setting, ''))) { if ($setting == 'prefix') { $new_label = $field_label_addition . ' - ' . $this->get_setting('label'); } else { $new_label = $this->get_setting('label') . ' - ' . $field_label_addition; } $this->set_setting('label', $new_label); } }