Ejemplo n.º 1
0
    /**
     * @param Option $option
     */
    public function deleteOption($option)
    {
        $this->getDb()->query(<<<SQL
            DELETE FROM `option`
            WHERE option_id = :optionId
SQL
, [':optionId' => $option->getId()]);
        $this->getDb()->query(<<<SQL
            DELETE FROM option_description
            WHERE option_id = :optionId
SQL
, [':optionId' => $option->getId()]);
        $this->getDb()->query(<<<SQL
            DELETE FROM option_value
            WHERE option_id = :optionId
SQL
, [':optionId' => $option->getId()]);
        $this->getDb()->query(<<<SQL
            DELETE FROM option_value_description
            WHERE option_id = :optionId
SQL
, [':optionId' => $option->getId()]);
    }
Ejemplo n.º 2
0
 /**
  * @return string
  */
 public function getName()
 {
     $description = $this->getDescriptions()->getDescription($this->option->getDefaultLanguageId());
     return is_null($description) ? '' : $description->getName();
 }