$this->fields = $fields->getArrayCopy();
}
+
+ /**
+ * Returns the current entity as an array
+ *
+ * @return array
+ */
+ public function toArray()
+ {
+ $account = parent::toArray();
+
+ if (empty($account['moved'])) {
+ unset($account['moved']);
+ }
+
+ return $account;
+ }
}
$this->card = $card->toArray();
$this->poll = null;
}
+
+ /**
+ * Returns the current entity as an array
+ *
+ * @return array
+ */
+ public function toArray()
+ {
+ $status = parent::toArray();
+
+ if (!$status['pinned']) {
+ unset($status['pinned']);
+ }
+
+ if (empty($status['application']['name'])) {
+ unset($status['application']);
+ }
+
+ return $status;
+ }
}