function testConstructorSetsType() { $entity = new VF_Level('make'); $this->assertSame('make', $entity->getType()); }
function testGetType() { $entity = new VF_Level('make'); $this->assertSame( self::ENTITY_TYPE_MAKE, $entity->getType() ); }
function listInUse(VF_Level $entity, $parents = array(), $product_id = 0) { unset($parents[$entity->getType()]); if (isset($this->objs_in_use[$entity->getType()][$entity->getId()])) { return $this->objs_in_use[$entity->getType()][$entity->getId()]; } $result = $this->doListInUse($entity, $parents, $product_id); $this->objs_in_use[$entity->getType()][$entity->getId()] = array(); while ($row = $result->fetchObject()) { $obj = $entity->createEntity($entity->getType(), 0); $obj->setId($row->id); $obj->setTitle($row->title); array_push($this->objs_in_use[$entity->getType()][$entity->getId()], $obj); } return $this->objs_in_use[$entity->getType()][$entity->getId()]; }