Get child profile.

@param string $profile

@return mixed
@throws Exception
550277
public function get(string $profile)
    {
        if (!$this->has($profile)) {
            throw new Exception("Profile {$profile} does not exist.");
        }

        return $this->children[$profile];
    }
441434
public function getChild( $index )
	{
		if( isset( $this->_children[$index] ) ) {
			return $this->_children[$index];
		}

		throw new MShop_Catalog_Exception( sprintf( 'Child node with index "%1$d" not available', $index ) );
	}
1164143
public function getChild($id)
    {
        return isset($this->children[$id]) ? $this->children[$id] : null;
    }
1218870
public function getProfile($i)
    {
        if (isset($this->profiles[$i])) {
            return $this->profiles[$i];
        } else {
            return false;
        }
    }
411923
public function getCurrent()
    {
        if (!$this->currentProfile) {
            // first check to see if we have a Profile in the session
            if ($profile_id = $this->session->get('profile_id')) {
                // we do, so try and grap it from the db
                $this->currentProfile = $this->doctrine->getManager()
                    ->getRepository('HarvestCloudCoreBundle:Profile')
                    ->find($profile_id)
                ;
            }

            $user = $this->context->getToken()->getUser();

            // try to get the current User's default Profile
            if (!$this->currentProfile) {
                $this->currentProfile = $user->getDefaultProfile();
            }

            // try to get the User's first Profile
            if (!$this->currentProfile) {
                foreach ($user->getProfiles() as $profile) {
                    $this->currentProfile = $profile;

                    break;
                }
            }

            if (!$this->currentProfile) {
                $this->session->remove('profile_id');

                throw new \Exception('Cannot find current Profile');
            }

            $this->session->set('profile_id', $this->currentProfile->getId());
        }

        return $this->currentProfile;
    }
1220626
public function getProfile($name) {
    $dirs = $this->config['profile.dirs'];
    foreach ($dirs as $dir) {
      if (!is_dir($dir) || !is_readable($dir)) {
        continue;
      }
      $filename = $dir . DIRECTORY_SEPARATOR . $name . '.profile';
      if (is_readable($filename)) {
        $content = file_get_contents($filename);
        $json = json_decode($content);
        return $json;
      }
    }
    throw new \Exception("Profile $name not found");
  }
865032
def getparent(self, profile):
        """"""
        assert self.parent
        for inputtemplate in profile.input:
            if inputtemplate == self.parent:
                return inputtemplate
        raise Exception("Parent InputTemplate '"+self.parent+"' not found!")
1132781
public function childAt($path)
    {
        if (!array_key_exists($path, $this->children)) {
            throw new NotFoundException(sprintf('Could not find child %s in %s', $path, $this->path()));
        }

        return $this->children[$path];
    }
44321
public function getProfile($name){
        if($this->loadProfiles != 'ALL' && !in_array($name, $this->loadProfiles)){
            $this->connection->select('id, name, join, error_redirect, error_forward');
            $this->connection->from($this->tableProfile);
            $this->connection->where('name = :name', array('name' => $name));
            $profile= $this->connection->get()->fetch(\PDO::FETCH_ASSOC);
            
            $this->connection->select('m.name');
            $this->connection->from($this->tableModulePermit . ' p');
            $this->connection->join($this->tableModule . ' m', 'p.moduleId = m.id');
            $this->connection->where('p.profileId = :id', array('id' => $profile['id']));
            $rta= $this->connection->get();
            $permitModules= array();
            while($module= $rta->fetch()){
                $permitModules[]= $module[0]; 
            }
            
            $this->connection->select('m.name');
            $this->connection->from($this->tableModuleDeny . ' p');
            $this->connection->join($this->tableModule . ' m', 'p.moduleId = m.id');
            $this->connection->where('p.profileId = :id', array('id' => $profile['id']));
            $rta= $this->connection->get();
            $denyModules= array();
            while($module= $rta->fetch()){
                $denyModules[]= $module[0]; 
            }
            
            $this->profiles[$name]= array('permit' => $permitModules, 'deny' => $denyModules, 'error-redirect' => $profile['error_redirect'], 'error-forward' => $profile['error_forward']);
            $this->loadProfiles[]= $name;
        }
        return $this->profiles[$name];
    }
201738
public function getChildren()
    {
        $driveLocator = "/drives/{$this->parentReference->driveId}";
        $itemLocator  = "/items/{$this->id}";
        $endpoint     = "$driveLocator$itemLocator/children";

        $response = $this
            ->graph
            ->createCollectionRequest('GET', $endpoint)
            ->execute();

        $status = $response->getStatus();

        if ($status != 200) {
            throw new \Exception("Unexpected status code produced by 'GET $endpoint': $status");
        }

        $driveItems = $response->getResponseAsObject(DriveItem::class);

        if (!is_array($driveItems)) {
            return [];
        }

        return array_map(function (DriveItem $driveItem) {
            return new self($this->graph, $driveItem);
        }, $driveItems);
    }
1092931
protected function getProfile() {
    if (empty($this->profile)) {
      $profiles = $this->discovery->scan('profile');

      if (empty($profiles['lightning'])) {
        throw new \RuntimeException('Lightning profile not found.');
      }
      $this->profile = $profiles['lightning'];
    }
    return $this->profile;
  }
883584
public function getChildren( $offset = 0, $limit = null, $mainTranslation = false )
    {
        return self::fetchByParentID( $this->attribute( 'id' ), $offset, $limit, $mainTranslation );
    }
712923
public function getProfile(string $key): array
    {
        if (isset($this->profiles[$key])) {
            return $this->profiles[$key];
        }

        throw new InvalidKeyException("Could not find a profile with given '{$key}' key!");
    }
205203
public function offsetGet($offset)
    {
        return isset($this->children[$offset]) ? $this->children[$offset] : null;
    }
653275
public function resolveProfilePath($path, $profile)
    {
        $path = $this->resolvePath($path);
        return preg_replace_callback('|\[\[([\w\_/]+)\]\]|', function ($matches) use ($profile) {
            $name = $matches[1];
            switch ($name) {
                case 'profile':
                    return $profile;
            }
            return '[[' . $name . ']]';
        }, $path);
    }
547496
public function remove(string $profile)
    {
        $child = $this->get($profile);
        $child->clearAll();
        $child->removeAll();

        unset($this->children[$profile]);

        return $this;
    }
1199451
public function getProfileSettings($profile)
    {
        $search = $this->repo->createSearch();
        $termQuery = new TermQuery('profile', $profile);
        $search->addQuery($termQuery);
        $search->setSize(1000);

        $settings = $this->repo->findArray($search);

        return $settings;
    }