public function beforeSave ($insert)
		{
			if ($parent = parent::beforeSave($insert))
			{
				if ($this->isNewRecord)
				{
					if ($this->hasAttribute('order') and empty($this->order))
					{
						$query = self::find()->select('order')->orderBy([ 'order' => SORT_DESC ]);

						$condition = $this->orderCondition();
						if ($condition !== null)
						{
							$query->where($condition);
						}

						$order = $query->scalar();

						$this->order = !is_null($order) ? $order + 1 : 1;
					}
				}
			}

			return $parent;
		}