src/snac/client/webui/util/ConstellationPostMapper.php
/**
     * Parse array to SNACDate
     *
     * Parses an array of date information from the web ui into a date object for adding to the Constellation's data objects
     *
     * @param string $short The short name of the date in the user interface, i.e. `exist` or `nameEntry_date_1`
     * @param string $k The ui-level container ID for the object (i.e. name entry on-page id this date is for)
     * @param string[] $data The associative array describing one date or dateRange
     */
Parse array to SNACDate
Parses an array of date information from the web ui into a date object for adding to the Constellation's data objects

@param string $short The short name of the date in the user interface, i.e. `exist` or `nameEntry_date_1`
@param string $k The ui-level container ID for the object
@param string[] $data The associative array describing one date or dateRange
Parse array to SNACDate Parses an array of date information from the web ui into a date object for adding to the Constellation ' s data objects @param string $short The short name of the date in the user interface i . e . ` exist ` or ` nameEntry_date_1 ` @param string $k The ui - level container ID for the object @param string [] $data The associative array describing one date or dateRange
function parseDate($short, $k, $data) {
        if ($data["id"] == "" && $data["operation"] != "insert")
            return null;
        $date = new \snac\data\SNACDate();
        if (!$this->mapAsNew) {
            $date->setID($data["id"]);
            $date->setVersion($data["version"]);
        }
        $date->setOperation($this->getOperation($data));
        $date->setNote($data["note"]);
        $date->setFromDate($data["startoriginal"], $data["start"], $this->parseTerm($data["starttype"]));
        $date->setFromDateRange($data["startnotBefore"], $data["startnotAfter"]);
        if ($data["isrange"] === "true")
            $date->setRange(true);
        else
            $date->setRange(false);
        $date->setToDate($data["endoriginal"], $data["end"], $this->parseTerm($data["endtype"]));
        $date->setToDateRange($data["endnotBefore"], $data["endnotAfter"]);
        $date->setAllSNACControlMetadata($this->parseSCM($data, $short, $k));
        return $date;
    }
function parseDate ( $ short , $ k , $ data ) { if ( $ data [ " id " ] == " " && $ data [ " operation " ] != " insert " ) return null ; $ date = new \ snac \ data \ SNACDate ( ) ; if ( ! $ this -> mapAsNew ) { $ date -> setID ( $ data [ " id " ] ) ; $ date -> setVersion ( $ data [ " version " ] ) ; } $ date -> setOperation ( $ this -> getOperation ( $ data ) ) ; $ date -> setNote ( $ data [ " note " ] ) ; $ date -> setFromDate ( $ data [ " startoriginal " ] , $ data [ " start " ] , $ this -> parseTerm ( $ data [ " starttype " ] ) ) ; $ date -> setFromDateRange ( $ data [ " startnotBefore " ] , $ data [ " startnotAfter " ] ) ; if ( $ data [ " isrange " ] === " true " ) $ date -> setRange ( true ) ; else $ date -> setRange ( false ) ; $ date -> setToDate ( $ data [ " endoriginal " ] , $ data [ " end " ] , $ this -> parseTerm ( $ data [ " endtype " ] ) ) ; $ date -> setToDateRange ( $ data [ " endnotBefore " ] , $ data [ " endnotAfter " ] ) ; $ date -> setAllSNACControlMetadata ( $ this -> parseSCM ( $ data , $ short , $ k ) ) ; return $ date ; }
Parse array to SNACDate
 Parses an array of date information from the web ui into a date object for adding to the Constellation's data objects
Parse array to SNACDate Parses an array of date information from the web ui into a date object for adding to the Constellation ' s data objects