Skip to content

SimplOn DOM ID creation #50

@dubrox

Description

@dubrox

The generation of the element ID in TimeSince.php uses the rand() function, which generates a numerical string. That makes a wrong ID value, as a DOM ID should always begin with an alphabetic character.

To generate the DOM elements ID in any SimplOn Element and Data, I think it would be a good idea to add a method to the BaseObject that goes like this:

function ObjectId() {
    return $this->getClassName() . '-' . $this->instanceId();
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions