Inherit property values from parent query

@param BaseQuery             $parent
@return void
164624
protected function inheritFromParent(BaseQuery $parent)
    {
        parent::inheritFromParent($parent);

        if ($parent instanceof Select) {
            $parent->copyTo($this);
        } 
    }
1233685
public function setParentId( $parentid )
	{
		if ( $parentid == $this->getParentId() ) { return; }

		$this->_values['parentid'] = (int) $parentid;
		$this->setModified();
	}
1198682
public void init(RecordOwnerParent parent, Rec recordMain, Map<String, Object> properties)
    {
        super.init(parent, recordMain, properties);
        if (properties != null)
            m_propTransport = properties;
        else
            m_propTransport = this.getTransportProperties();
    }
1212719
protected function bindData(&$parent, $data)
  {
    if ( is_object($data) ){
      $data = get_object_vars($data);
    }
    else {
      $data = (array) $data;
    }
    
    foreach($data as $k => $v){
      if ( (is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v) ){
        $parent->$k = new \stdClass;
        $this->bindData($parent->$k, $v);
      }
      else {
        $parent->$k = $v;
      }
    }
  }
1323969
protected function _inherit() {

		$inherited = array_fill_keys($this->_inherited(), []);

		foreach (static::_parents() as $parent) {
			$parentConfig = get_class_vars($parent);

			foreach ($inherited as $key => $value) {
				if (isset($parentConfig["{$key}"])) {
					$val = $parentConfig["{$key}"];
					if (is_array($val)) {
						$inherited[$key] += $val;
					}
				}
			}

			if ($parent === __CLASS__) {
				break;
			}
		}

		foreach ($inherited as $key => $value) {
			if (is_array($this->{$key})) {
				$this->{$key} += $value;
			}
		}
	}
945276
protected function completeValue(Basevalue $value)
    {
        parent::completeValue($value);

        if (isset($value->downloadCount) && $value->downloadCount === null) {
            $value->downloadCount = 0;
        }
    }
1070123
function inherit(child, base, properties) {
  var baseP = base.prototype;
  var childP;

  childP = child.prototype = Object.create(baseP);
  childP.constructor = child;
  childP.superior = baseP;

  if (properties) {
    extend(childP, properties);
  }
}
528303
private function takeProperties(File $baseFile): void
    {
        $baseProps = get_object_vars($baseFile);

        array_walk($baseProps, function ($value, $key) {
            $this->$key = $value;
        });
    }
93639
public function getRelationCountQuery(Query $query, Query $parent)
    {
        $query = parent::getRelationCountQuery($query, $parent);

        return $query->where($this->table.'.'.$this->morphType, $this->morphClass);
    }
448419
public function setParent($parent)
    {
        if (null === $parent) {
            $this->parent = null;

            return $this;
        }

        if (is_string($parent)) {
            $this->parent = new Role($parent);

            return $this;
        }

        if ($parent instanceof RoleInterface) {
            $this->parent = $parent;

            return $this;
        }

        throw Exception\InvalidRoleException::invalidRoleInstance($parent);
    }
538760
final public function internalSetParent(ParentNodeInterface $parent)
    {
        $this->emit('parent.change', [$parent, $this]);
        $this->parentNode = $parent;
    }
943046
public static function queryByParent( $parentId, $parentType ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype", [ ':pid' => $parentId, ':ptype' => $parentType ] );
	}
95067
function inherit(Style $parent)
    {

        // Set parent font size
        $this->_parent_font_size = $parent->get_font_size();

        foreach (self::$_inherited as $prop) {
            //inherit the !important property also.
            //if local property is also !important, don't inherit.
            if (isset($parent->_props[$prop]) &&
                (!isset($this->_props[$prop]) ||
                    (isset($parent->_important_props[$prop]) && !isset($this->_important_props[$prop]))
                )
            ) {
                if (isset($parent->_important_props[$prop])) {
                    $this->_important_props[$prop] = true;
                }
                //see __set and __get, on all assignments clear cache!
                $this->_prop_cache[$prop] = null;
                $this->_props[$prop] = $parent->_props[$prop];
            }
        }

        foreach ($this->_props as $prop => $value) {
            if ($value === "inherit") {
                if (isset($parent->_important_props[$prop])) {
                    $this->_important_props[$prop] = true;
                }
                //do not assign direct, but
                //implicite assignment through __set, redirect to specialized, get value with __get
                //This is for computing defaults if the parent setting is also missing.
                //Therefore do not directly assign the value without __set
                //set _important_props before that to be able to propagate.
                //see __set and __get, on all assignments clear cache!
                //$this->_prop_cache[$prop] = null;
                //$this->_props[$prop] = $parent->_props[$prop];
                //props_set for more obvious explicite assignment not implemented, because
                //too many implicite uses.
                // $this->props_set($prop, $parent->$prop);
                $this->__set($prop, $parent->__get($prop));
            }
        }

        return $this;
    }
78418
public function handleGetChildren($parent)
	{
		$this->setDataSource(
			call_user_func($this->tree_view_children_callback, $parent)
		);

		if ($this->getPresenter()->isAjax()) {
			$this->getPresenter()->payload->_datagrid_url = $this->refresh_url;
			$this->getPresenter()->payload->_datagrid_tree = $parent;

			$this->redrawControl('items');

			$this->onRedraw();
		} else {
			$this->getPresenter()->redirect('this');
		}
	}
1070875
protected function updateNodeParent($nodeId, $parent)
    {
        $config = $this->config;
        $this->getFluent()
                ->update($config['table'])
                ->set($config['prt'], $parent)
                ->where($config['id'], $nodeId)
                ->execute();
    }
159955
public function getRelationCountQuery(Query $query, Query $parent)
    {
        $query->select(new Expression('count(*)'));

        $key = $this->wrap($this->getQualifiedParentKeyName());

        return $query->where($this->getHasCompareKey(), '=', new Expression($key));
    }
197627
public function setParent($parent){

            $this->parent = $parent;

            if($this->parentCallback){
                call_user_func($this->parentCallback);
            }

            return $this;

        }