/** * Get the fields used by the channels in the specified collection * @param \rsanchez\Deep\Collection\ChannelCollection $channels * @return \rsanchez\Deep\Collection\FieldCollection */ public function getFieldsByChannelCollection(ChannelCollection $channels) { $this->boot(); $fields = new FieldCollection(); foreach ($channels as $channel) { foreach ($channel->fields as $field) { $fields->push($field); } } return $fields; }
/** * Get the field IDs for the specified fieldtype * * @param string $fieldtype * @return array */ public function getFieldIdsByFieldtype($fieldtype) { return $this->fields->getFieldIdsByFieldtype($fieldtype); }