/** * @param Admin $object * * @return \Thelia\Form\BaseForm */ protected function hydrateObjectForm($object) { $data = array('id' => $object->getId(), 'firstname' => $object->getFirstname(), 'lastname' => $object->getLastname(), 'login' => $object->getLogin(), 'profile' => $object->getProfileId(), 'locale' => $object->getLocale(), 'email' => $object->getEmail()); // Setup the object form return $this->createForm(AdminForm::ADMINISTRATOR_MODIFICATION, "form", $data); }
/** * Filter the query by a related \Thelia\Model\Admin object * * @param \Thelia\Model\Admin|ObjectCollection $admin the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildProfileQuery The current query, for fluid interface */ public function filterByAdmin($admin, $comparison = null) { if ($admin instanceof \Thelia\Model\Admin) { return $this->addUsingAlias(ProfileTableMap::ID, $admin->getProfileId(), $comparison); } elseif ($admin instanceof ObjectCollection) { return $this->useAdminQuery()->filterByPrimaryKeys($admin->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByAdmin() only accepts arguments of type \\Thelia\\Model\\Admin or Collection'); } }