1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved How to i reset value on the Attribute Map?

Discussion in 'Development' started by TestDevelopment, Mar 5, 2021.

  1. TestDevelopment

    TestDevelopment Spider Jockey

    Messages:
    41
    GitHub:
    non
    Can i reset this somehow?


    PHP:
    $atr $entity->getAttributeMap()->getAttribute(5);
    $atr->setValue($s[1]);
     
  2. TestDevelopment

    TestDevelopment Spider Jockey

    Messages:
    41
    GitHub:
    non
    Let say $s[1] == 2
     
  3. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    PHP:
    foreach($this->attributeMap->getAll() as $attr){
           
    $attr->resetToDefault();
    }
    This is how PMMP does in Player.php.
     
    TestDevelopment and Primus like this.
  4. TestDevelopment

    TestDevelopment Spider Jockey

    Messages:
    41
    GitHub:
    non
    K thx
     
    minijaham likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.