Skip to content

Commit

Permalink
Update expression-language.md
Browse files Browse the repository at this point in the history
Add horizontal dividers
  • Loading branch information
murtukov authored Jul 19, 2019
1 parent a61bc80 commit 879f5a5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/definitions/expression-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Examples:
@=ser('App\\\\Manager\\\\UserManager').someMethod()
```

---

### parameter
**Signature**: <code><b>parameter</b>(string <b>$name</b>): mixed</code> | **Alias**: `param`

Expand All @@ -66,6 +68,8 @@ Examples:
@=param('mailer.transport')
```

---

### isTypeOf
**Signature**: <code><b>isTypeOf</b>(string <b>$className</b>): boolean</code>

Expand All @@ -76,6 +80,8 @@ Example:
@=isTypeOf("App\\User\\User")
```

---

### resolver
**Signature**: <code><b>resolver</b>(string <b>$alias</b>, array <b> $args</b> = []): mixed</code> | **Alias**: `res`

Expand All @@ -94,6 +100,8 @@ Examples:
@=res('App\\\\GraphQL\\\\Resolver\\\\UserResolver::findOne', [args, info, context, value])
```

---

### mutation
**Signature**: <code><b>mutation</b>(string <b>$alias</b>, array <b> $args</b> = []): mixed</code> | **Alias**: `mut`

Expand All @@ -112,6 +120,8 @@ Examples:
@=mut('App\\\\GraphQL\\\\Mutation\\\\PostMutation::findAll', [args])
```

---

### arguments
**Signature**: <code><b>arguments</b>(array <b>$mapping</b>, mixed <b> $data</b>): mixed</code>

Expand All @@ -122,6 +132,8 @@ Example:
@=arguments(['input' => 'MyInput'], ['input' => ['field1' => 'value1']])
```

---

### globalId
**Signature**: <code><b>globalId</b>(string|int <b>$id</b>, string <b> $typeName</b> = null): string</code>

Expand All @@ -132,6 +144,8 @@ Example:
@=globalId(15, 'User')
```

---

### fromGlobalId
**Signature**: <code><b>fromGlobalId</b>(string <b>$globalId</b>): array</code>

Expand All @@ -142,6 +156,8 @@ Example:
@=fromGlobalId(‘QmxvZzox’)
```

---

### newObject
**Signature**: <code><b>newObject</b>(string <b>$className</b>, array <b> $args</b> = []): object</code>

Expand All @@ -159,6 +175,8 @@ Examples:
@=resolver("myResolver", [newObject("App\\User\\User", [args])])
```

---

### call
**Signature**: <code><b>call</b>(callable <b> $target</b>, array <b> $args</b> = []): mixed</code>

Expand All @@ -176,6 +194,8 @@ call(["App\\Util\\Validator", "email"], [args["email"]])
@=call('array_merge', [args['array1'], args['array2']])
```

---

### hasRole
**Signature**: <code><b>hasRole</b>(string <b>$role</b>): bool</code>

Expand All @@ -186,6 +206,8 @@ Example:
@=hasRole('ROLE_API')
```

---

### hasAnyRole
**Signature**: <code><b>hasAnyRole</b>(string <b> $role1</b>, string <b> $role2</b>, .\.\.string <b> $roleN</b>): bool</code>

Expand All @@ -196,6 +218,8 @@ Example:
@=hasAnyRole('ROLE_API', 'ROLE_ADMIN')
```

---

### isAnonymous
**Signature**: <code><b>isAnonymous</b>(): bool</code>

Expand All @@ -210,6 +234,8 @@ Example:
@=isAnonymous()
```

---

### isRememberMe
**Signature**: <code><b>isRememberMe</b>(): bool</code>

Expand All @@ -223,6 +249,8 @@ Example:
@=isRememberMe()
```

---

### isFullyAuthenticated
**Signature**: <code><b>isFullyAuthenticated</b>(): bool</code>

Expand All @@ -236,6 +264,8 @@ Example:
@=isFullyAuthenticated()
```

---

### isAuthenticated()
**Signature**: <code><b>isAuthenticated</b>(): bool</code>

Expand All @@ -249,6 +279,8 @@ Example:
@=isAuthenticated()
```

---

### hasPermission
**Signature**: <code><b>hasPermission</b>(object<b> $object</b>, string <b> $permission</b>): bool</code>

Expand All @@ -260,6 +292,8 @@ Example:
@=hasPermission(ser('user_repository').find(1), ‘OWNER’)
```

---

### hasAnyPermission
**Signature**: <code><b>hasAnyPermission</b>(object<b> $object</b>, array<b> $permission</b>): bool</code>

Expand All @@ -271,6 +305,8 @@ Example:
@=hasAnyPermission(service('my_service').getObject(), [‘OWNER’, ‘ADMIN’])
```

---

### getUser
**Signature**: <code><b>getUser</b>(): Symfony\Component\Security\Core\User\UserInterface|null</code>

Expand Down

0 comments on commit 879f5a5

Please sign in to comment.