?> <?php foreach ($entry as $data_label => $data_value) { ?> <tr> <td><?php echo $data_label; ?> </td> <?php if (is_array($data_value)) { ?> <td><?php echo Helper::recursive_implode($data_value, ", ", false, false); ?> </td> <?php } else { ?> <td><?php echo $data_value; ?> </td> <?php } ?> </tr> <?php }
<th>Field</th> <th>Imported Record</th> <th>Existing Record</th> </tr> </thead> <tbody> <?php foreach ($data as $attribute_id => $entry) { ?> <?php foreach ($entry as $data_label => $data_value) { ?> <?php if (is_array($data_value)) { $data_value = Helper::recursive_implode($data_value); } ?> <tr class="<?php if (isset($fields[$attribute_id])) { echo "duplicate"; } ?> "> <td><?php echo $data_label; ?> </td> <td><?php
protected function formatFormMessages($form, $glue = ". <br>\n", $debug = false) { $messages = $form->getMessages(); $output = []; foreach ($messages as $field => $notice) { foreach ($notice as $rule => $message) { if (is_array($message)) { $output[] = "The field \"{$field}\" is invalid. " . ($debug ? $glue . Helper::recursive_implode($message, $glue) : ""); } else { $output[] = "The field \"{$field}\" is invalid. {$message}"; } } } return implode($glue, $output); }
public function __toString() { $fValue = $this->getValue(); $criterion = $this->getCriterion(); if ($criterion) { $relationship = $criterion->getRelationship(); if ($relationship) { $type = $relationship->getInput(); if ($type) { $methodName = "get" . ucwords($type); if (method_exists($this, $methodName)) { switch ($type) { case 'boolean': case 'string': case 'daterange': case 'range': $fValue = $this->{$methodName}(); break; case 'location': case 'multiple': $value = $this->{$methodName}(); $fValue = is_array($value) ? Helper::recursive_implode($value, ", ", false) : $value; break; } } } } } return $fValue; }