protected function loadMembers(MemberCollection $collection = null)
{
$standard = $this->standard ?: $this->manager->getStandard();
$data = $this->manager->getRepository()->getData(get_class($this), ['code' => $this->getCode(), 'parentCode' => $this->getParentCode()]);
$collection = $collection ?: new MemberCollection($this->manager);
foreach ($data as $meta) {
$entity = new $this->memberClass($meta, $this->getCode(), $this->manager);
if (!empty($entity[$standard . 'Code'])) {
$collection->add($entity, $entity[$standard . 'Code']);
}
}
$this->members = $collection;
}