Jarves\Configuration\Object::getLabel PHP Méthode

getLabel() public méthode

public getLabel ( ) : string
Résultat string
    public function getLabel()
    {
        return $this->label;
    }

Usage Example

Exemple #1
0
    public function testObjectItemArray()
    {
        $xml = '
<object id="Item">
  <label>title</label>
  <table>test_item</table>
  <labelField>title</labelField>
  <nested>false</nested>
  <multiLanguage>false</multiLanguage>
  <workspace>true</workspace>
  <domainDepended>false</domainDepended>
  <treeFixedIcon>false</treeFixedIcon>
  <fields>
    <field id="id" type="number" primaryKey="true" autoIncrement="true">
    </field>
    <field id="title" type="text">
    </field>
    <field id="category" type="object">
      <object>test/itemCategory</object>
      <objectRelation>nToM</objectRelation>
    </field>
    <field id="oneCategory" type="object">
      <object>test/itemCategory</object>
      <objectRelation>nTo1</objectRelation>
    </field>
  </fields>
</object>';
        $object = new Object($xml, $this->getJarves());
        $array = $object->toArray();
        $this->assertEquals('Item', $object->getId());
        $this->assertEquals('title', $object->getLabel());
        $this->assertEquals('test_item', $object->getTable());
        $this->assertTrue($object->getWorkspace());
        $this->assertCount(4, $object->getFields());
        $this->assertEquals('Item', $array['id']);
        $this->assertEquals('title', $array['label']);
        $this->assertEquals('test_item', $array['table']);
        $this->assertTrue($array['workspace']);
        $this->assertCount(4, $array['fields']);
    }
All Usage Examples Of Jarves\Configuration\Object::getLabel
Object