File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/location/core/src/entity/address/addresslinkcollection.js
Back
import AddressLink from "./addresslink"; export default class AddressLinkCollection { #links = []; constructor(props = {}) { this.links = !!props.links ? props.links : []; } set links(links: Array): void { if(!Array.isArray(links)) { throw new Error('links must be array!'); } for(let link of links) { this.addLink(link); } } get links() { return this.#links; } addLink(link: AddressLink) { if(!(link instanceof AddressLink)) { throw new Error('Argument link must be instance of Field!'); } this.#links.push(link); } clearLinks() { this.#links = []; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings