Skip to content

Commit cf6e3f2

Browse files
Merge pull request #20 from williamespindola/fix/extension-field-dependency-methods
Fix/extension field dependency methods
2 parents 4f65171 + 695f146 commit cf6e3f2

26 files changed

+530
-119
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build
22
composer.lock
33
docs
4-
vendor
4+
vendor

config/xml/WilliamEspindola.Field.Entity.Collection.dcm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
66

7-
<entity name="WilliamEspindola\Field\Entity\Collection">
7+
<entity name="WilliamEspindola\Field\Entity\Collection" table="collection">
88
<id name="id" type="integer">
99
<generator strategy="AUTO" />
1010
</id>

config/xml/WilliamEspindola.Field.Entity.CollectionField.dcm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
66

7-
<entity name="WilliamEspindola\Field\Entity\CollectionField">
7+
<entity name="WilliamEspindola\Field\Entity\CollectionField" table="collectionfield">
88
<id name="id" type="integer">
99
<generator strategy="AUTO" />
1010
</id>

config/xml/WilliamEspindola.Field.Entity.Field.dcm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
66

7-
<entity name="WilliamEspindola\Field\Entity\Field">
7+
<entity name="WilliamEspindola\Field\Entity\Field" table="field">
88
<id name="id" type="integer">
99
<generator strategy="AUTO" />
1010
</id>

config/xml/option.dcm.xml renamed to config/xml/WilliamEspindola.Field.Entity.Options.dcm.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">
66

7-
<entity name="option">
7+
<entity name="WilliamEspindola\Field\Entity\Options" table="options">
88
<id name="id" type="integer">
99
<generator strategy="AUTO" />
1010
</id>
1111

12-
<field name="option" type="string" />
12+
<field name="value" type="string" />
1313

1414
<many-to-one target-entity="WilliamEspindola\Field\Entity\Field" field="field" />
1515
</entity>

data/mysql-schema.sql

Lines changed: 0 additions & 47 deletions
This file was deleted.

data/schema-0.3.mwb

-9.52 KB
Binary file not shown.

data/schema-0.3.mwb.bak

-9.42 KB
Binary file not shown.

data/schema-0.3.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ ENGINE = InnoDB;
5353

5454

5555
-- -----------------------------------------------------
56-
-- Table `mydb`.`collection_field`
56+
-- Table `mydb`.`collectionfield`
5757
-- -----------------------------------------------------
58-
CREATE TABLE IF NOT EXISTS `mydb`.`collection_field` (
58+
CREATE TABLE IF NOT EXISTS `mydb`.`collectionfield` (
5959
`collection_id` INT NOT NULL,
6060
`field_id` INT NOT NULL,
6161
`id` INT NOT NULL AUTO_INCREMENT,
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace WilliamEspindola\Field\Entity;
44

5-
class Option implements EntityInterface
5+
class Options implements EntityInterface
66
{
77
/**
88
* @var integer
@@ -12,27 +12,27 @@ class Option implements EntityInterface
1212
/**
1313
* @var text
1414
*/
15-
private $option;
15+
private $value;
1616

1717
/**
1818
* $var object WilliamEspindola\Field\Entity\Field
1919
*/
20-
private $field_id;
20+
private $field;
2121

2222
/**
23-
* @param mixed $field_id
23+
* @param mixed $field
2424
*/
25-
public function setFieldId($field_id)
25+
public function setField($field)
2626
{
27-
$this->field_id = $field_id;
27+
$this->field = $field;
2828
}
2929

3030
/**
3131
* @return mixed
3232
*/
33-
public function getFieldId()
33+
public function getField()
3434
{
35-
return $this->field_id;
35+
return $this->field;
3636
}
3737

3838
/**
@@ -52,18 +52,18 @@ public function getId()
5252
}
5353

5454
/**
55-
* @param text $option
55+
* @param text $value
5656
*/
57-
public function setOption($option)
57+
public function setValue($value)
5858
{
59-
$this->option = $option;
59+
$this->value = $value;
6060
}
6161

6262
/**
6363
* @return text
6464
*/
65-
public function getOption()
65+
public function getValue()
6666
{
67-
return $this->option;
67+
return $this->value;
6868
}
6969
}

0 commit comments

Comments
 (0)